Search in sources :

Example 11 with ConfigurationMap

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

the class ConfigurationMapUnitTest method testInvalidUuid.

@Test(expected = ClassCastException.class)
public void testInvalidUuid() {
    ConfigurationMap config = new ConfigurationMap();
    config.put(UUID_PARAMETER, "wrong");
    // 
    config.getUuid(UUID_PARAMETER);
}
Also used : ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) AbstractUnitTest(eu.bcvsolutions.idm.test.api.AbstractUnitTest) Test(org.junit.Test)

Example 12 with ConfigurationMap

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

the class ConfigurationMapUnitTest method testNotEqualsKeys.

@Test
public void testNotEqualsKeys() {
    ConfigurationMap configOne = new ConfigurationMap();
    configOne.put("one", true);
    ConfigurationMap configTwo = new ConfigurationMap();
    configTwo.put("ones", true);
    // 
    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 13 with ConfigurationMap

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

the class ConfigurationMapUnitTest method testNotEqualsDeepListsDifferentOrder.

@Test
public void testNotEqualsDeepListsDifferentOrder() {
    ConfigurationMap configOne = new ConfigurationMap();
    configOne.put("one", Lists.newArrayList("two", "one"));
    ConfigurationMap configTwo = new ConfigurationMap();
    configTwo.put("one", Lists.newArrayList("one", "two"));
    // 
    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 14 with ConfigurationMap

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

the class ConfigurationMapUnitTest method testEquals.

@Test
public void testEquals() {
    ConfigurationMap configOne = new ConfigurationMap();
    configOne.put("one", "valueOne");
    ConfigurationMap configTwo = new ConfigurationMap();
    configTwo.put("one", "valueOne");
    // 
    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 15 with ConfigurationMap

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

the class ConfigurationMapUnitTest method testEqualsMoreKeys.

@Test
public void testEqualsMoreKeys() {
    ConfigurationMap configOne = new ConfigurationMap();
    configOne.put("two", true);
    configOne.put("one", true);
    ConfigurationMap configTwo = new ConfigurationMap();
    configTwo.put("one", true);
    configTwo.put("two", 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