Example usage for org.apache.commons.collections CollectionUtils size

List of usage examples for org.apache.commons.collections CollectionUtils size

Introduction

In this page you can find the example usage for org.apache.commons.collections CollectionUtils size.

Prototype

public static int size(Object object) 

Source Link

Document

Gets the size of the collection/iterator specified.

Usage

From source file:org.piraso.web.base.PirasoResponseWrapperTest.java

@Test
public void testAddSetIntHeader() throws Exception {
    wrapper.addIntHeader("int", 1);
    wrapper.setIntHeader("int2", 2);

    assertEquals(2, CollectionUtils.size(entry.getIntHeader()));
}

From source file:org.sonar.api.database.configuration.ResourceDatabaseConfigurationTest.java

@Test
public void shouldNotLoadGlobalProperties() {
    setupData("shouldNotLoadGlobalProperties");

    ResourceDatabaseConfiguration conf = new ResourceDatabaseConfiguration(getSessionFactory(), 100);
    assertEquals(2, CollectionUtils.size(conf.getKeys()));
    assertEquals("project_value1", conf.getString("key1"));
    assertNull(conf.getString("key2"));
}