Skip to content
Snippets Groups Projects
Commit 63ae6ee6 authored by izabel's avatar izabel
Browse files

[LMS-661] add test

SVN: 9607
parent e034a4c5
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
package ch.systemsx.cisd.openbis.generic.server.dataaccess.db; package ch.systemsx.cisd.openbis.generic.server.dataaccess.db;
import java.util.Date;
import junit.framework.Assert; import junit.framework.Assert;
import org.testng.annotations.DataProvider; import org.testng.annotations.DataProvider;
...@@ -23,6 +25,7 @@ import org.testng.annotations.Test; ...@@ -23,6 +25,7 @@ import org.testng.annotations.Test;
import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePropertyTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePropertyTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
import ch.systemsx.cisd.openbis.generic.shared.dto.PropertyTypePE; import ch.systemsx.cisd.openbis.generic.shared.dto.PropertyTypePE;
import ch.systemsx.cisd.openbis.generic.shared.dto.properties.EntityKind; import ch.systemsx.cisd.openbis.generic.shared.dto.properties.EntityKind;
...@@ -64,9 +67,9 @@ public class EntityPropertyTypeDAOTest extends AbstractDAOTest ...@@ -64,9 +67,9 @@ public class EntityPropertyTypeDAOTest extends AbstractDAOTest
Assert.assertNull(assignment); Assert.assertNull(assignment);
} }
@Test(groups = "broken", dataProvider = "entityKindsWithEntityTypeAndPropertyTypeNotAssigned") @Test(dataProvider = "entityKindsWithEntityTypeAndPropertyTypeNotAssigned")
public void testCreateEntityPropertyTypeAssignment(EntityKind entityKind, String typeCode, public void testCreateEntityPropertyTypeAssignment(EntityKind entityKind, String typeCode,
String propertyCode) throws Exception String propertyCode)
{ {
// prepare data // prepare data
EntityTypePE entityType = EntityTypePE entityType =
...@@ -101,12 +104,14 @@ public class EntityPropertyTypeDAOTest extends AbstractDAOTest ...@@ -101,12 +104,14 @@ public class EntityPropertyTypeDAOTest extends AbstractDAOTest
private EntityTypePropertyTypePE createAssignment(EntityKind entityKind, private EntityTypePropertyTypePE createAssignment(EntityKind entityKind,
EntityTypePE entityType, PropertyTypePE propertyType) EntityTypePE entityType, PropertyTypePE propertyType)
{ {
EntityTypePropertyTypePE entityPropertyTypeAssignement = final PersonPE registrator = getTestPerson();
EntityTypePropertyTypePE result =
EntityTypePropertyTypePE.createEntityTypePropertyType(entityKind); EntityTypePropertyTypePE.createEntityTypePropertyType(entityKind);
entityPropertyTypeAssignement.setEntityType(entityType); result.setEntityType(entityType);
entityPropertyTypeAssignement.setPropertyType(propertyType); result.setPropertyType(propertyType);
entityPropertyTypeAssignement.setRegistrator(getTestPerson()); result.setRegistrator(registrator);
return entityPropertyTypeAssignement; result.setRegistrationDate(new Date());
return result;
} }
@SuppressWarnings("unused") @SuppressWarnings("unused")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment