Search in sources :

Example 1 with ConfigurationMap

use of eu.bcvsolutions.idm.core.api.domain.ConfigurationMap in project CzechIdMng by bcvsolutions.

the class ConfigurationMapUnitTest method testEqualsDeepLists.

@Test
public void testEqualsDeepLists() {
    ConfigurationMap configOne = new ConfigurationMap();
    configOne.put("one", Lists.newArrayList("one", "two"));
    ConfigurationMap configTwo = new ConfigurationMap();
    configTwo.put("one", Lists.newArrayList("one", "two"));
    // 
    Assert.assertTrue(configOne.equals(configTwo));
}
Also used : ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) AbstractUnitTest(eu.bcvsolutions.idm.test.api.AbstractUnitTest) Test(org.junit.Test)

Example 2 with ConfigurationMap

use of eu.bcvsolutions.idm.core.api.domain.ConfigurationMap in project CzechIdMng by bcvsolutions.

the class ConfigurationMapUnitTest method testToMap.

@Test
public void testToMap() {
    ConfigurationMap config = new ConfigurationMap();
    config.put("one", true);
    // 
    Assert.assertEquals(true, config.toMap().get("one"));
}
Also used : ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) AbstractUnitTest(eu.bcvsolutions.idm.test.api.AbstractUnitTest) Test(org.junit.Test)

Example 3 with ConfigurationMap

use of eu.bcvsolutions.idm.core.api.domain.ConfigurationMap in project CzechIdMng by bcvsolutions.

the class ConfigurationMapUnitTest method testNotEquals.

@Test
public void testNotEquals() {
    ConfigurationMap configOne = new ConfigurationMap();
    configOne.put("one", "valueOne");
    ConfigurationMap configTwo = new ConfigurationMap();
    configTwo.put("one", "valueOnea");
    // 
    Assert.assertFalse(configOne.equals(configTwo));
}
Also used : ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) AbstractUnitTest(eu.bcvsolutions.idm.test.api.AbstractUnitTest) Test(org.junit.Test)

Example 4 with ConfigurationMap

use of eu.bcvsolutions.idm.core.api.domain.ConfigurationMap in project CzechIdMng by bcvsolutions.

the class ConfigurationMapUnitTest method testEqualsEntity.

@Test
public void testEqualsEntity() {
    ConfigurationMap configOne = new ConfigurationMap();
    UUID uuid = UUID.randomUUID();
    configOne.put("one", new IdmIdentityDto(uuid));
    ConfigurationMap configTwo = new ConfigurationMap();
    configTwo.put("one", new IdmIdentityDto(uuid));
    // 
    Assert.assertTrue(configOne.equals(configTwo));
}
Also used : ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) UUID(java.util.UUID) IdmIdentityDto(eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto) AbstractUnitTest(eu.bcvsolutions.idm.test.api.AbstractUnitTest) Test(org.junit.Test)

Example 5 with ConfigurationMap

use of eu.bcvsolutions.idm.core.api.domain.ConfigurationMap in project CzechIdMng by bcvsolutions.

the class ConfigurationMapUnitTest method testEqualsBoolean.

@Test
public void testEqualsBoolean() {
    ConfigurationMap configOne = new ConfigurationMap();
    configOne.put("one", true);
    ConfigurationMap configTwo = new ConfigurationMap();
    configTwo.put("one", true);
    // 
    Assert.assertTrue(configOne.equals(configTwo));
}
Also used : ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) AbstractUnitTest(eu.bcvsolutions.idm.test.api.AbstractUnitTest) Test(org.junit.Test)

Aggregations

ConfigurationMap (eu.bcvsolutions.idm.core.api.domain.ConfigurationMap)16 AbstractUnitTest (eu.bcvsolutions.idm.test.api.AbstractUnitTest)15 Test (org.junit.Test)15 UUID (java.util.UUID)3 IdmIdentityDto (eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)2