diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverterTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverterTest.java index 322927142710bdc969a89ad212e537b900719b16..f392f860e8965faadd3d12998f52fee5cc7183d2 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverterTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/EntityPropertiesConverterTest.java @@ -29,6 +29,7 @@ import org.testng.annotations.Test; import ch.rinn.restrictions.Friend; import ch.systemsx.cisd.common.exceptions.UserFailureException; +import ch.systemsx.cisd.common.test.RecordingMatcher; import ch.systemsx.cisd.openbis.generic.server.business.ManagerTestTool; import ch.systemsx.cisd.openbis.generic.server.dataaccess.IPropertyValueValidator; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DataType; @@ -50,6 +51,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.properties.EntityKind; * * @author Christian Ribeaud */ +// TODO 2010-01-11, Piotr Buczek: test dynamic and managed properties handling @Friend(toClasses = EntityPropertiesConverter.class) public final class EntityPropertiesConverterTest extends AbstractBOTest { @@ -168,6 +170,9 @@ public final class EntityPropertiesConverterTest extends AbstractBOTest { final IEntityPropertiesConverter entityPropertiesConverter = createEntityPropertiesConverter(EntityKind.SAMPLE); + + final RecordingMatcher<Set<IEntityProperty>> definedPropertiesMatcher = + RecordingMatcher.create(); context.checking(new Expectations() { { @@ -180,11 +185,10 @@ public final class EntityPropertiesConverterTest extends AbstractBOTest one(dynamicPropertiesChecker).checkDynamicPropertiesNotManuallyUpdated( with(propertiesToUpdateMatcher), with(dynamicPropertiesMatcher)); - CollectionMatcher<Set<IEntityProperty>> definedPropertiesMatcher = - new CollectionMatcher<Set<IEntityProperty>>( - new HashSet<IEntityProperty>()); one(placeholderCreator).addDynamicPropertiesPlaceholders( with(definedPropertiesMatcher), with(dynamicPropertiesMatcher)); + one(placeholderCreator).addManagedPropertiesPlaceholders( + with(definedPropertiesMatcher), with(dynamicPropertiesMatcher)); } }); final List<EntityPropertyPE> properties = @@ -201,6 +205,9 @@ public final class EntityPropertiesConverterTest extends AbstractBOTest createEntityPropertiesConverter(EntityKind.SAMPLE); final PropertyTypePE propertyTypePE = createPropertyType(); final IEntityProperty[] properties = createSampleProperties(false); + + final RecordingMatcher<Set<IEntityProperty>> definedPropertiesMatcher = + RecordingMatcher.create(); context.checking(new Expectations() { { @@ -244,11 +251,10 @@ public final class EntityPropertiesConverterTest extends AbstractBOTest { listOfProperties.add(p); } - CollectionMatcher<Set<IEntityProperty>> definedPropertiesMatcher = - new CollectionMatcher<Set<IEntityProperty>>( - new HashSet<IEntityProperty>()); one(placeholderCreator).addDynamicPropertiesPlaceholders( with(definedPropertiesMatcher), with(dynamicPropertiesMatcher)); + one(placeholderCreator).addManagedPropertiesPlaceholders( + with(definedPropertiesMatcher), with(dynamicPropertiesMatcher)); } }); @@ -278,6 +284,9 @@ public final class EntityPropertiesConverterTest extends AbstractBOTest createEntityPropertiesConverter(EntityKind.SAMPLE); final PropertyTypePE propertyTypePE = createPropertyType(); final IEntityProperty[] properties = createSampleProperties(true); + + final RecordingMatcher<Set<IEntityProperty>> definedPropertiesMatcher = + RecordingMatcher.create(); context.checking(new Expectations() { { @@ -302,11 +311,10 @@ public final class EntityPropertiesConverterTest extends AbstractBOTest { listOfProperties.add(p); } - CollectionMatcher<Set<IEntityProperty>> definedPropertiesMatcher = - new CollectionMatcher<Set<IEntityProperty>>( - new HashSet<IEntityProperty>()); one(placeholderCreator).addDynamicPropertiesPlaceholders( with(definedPropertiesMatcher), with(dynamicPropertiesMatcher)); + one(placeholderCreator).addManagedPropertiesPlaceholders( + with(definedPropertiesMatcher), with(dynamicPropertiesMatcher)); } }); final List<EntityPropertyPE> convertedProperties =