diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java index 35ccac9562bbef606f3f7c5d307eed9162bfb8f7..601b613b10a4e89e8e33d488084762a6efaab1ca 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java @@ -184,9 +184,6 @@ public final class SampleBOTest extends AbstractBOTest set.add(samplePropertyPE); will(returnValue(set)); - one(daoFactory).getPermIdDAO(); - will(returnValue(permIdDAO)); - one(permIdDAO).createPermId(); will(returnValue("2009010112341234-1")); @@ -309,19 +306,14 @@ public final class SampleBOTest extends AbstractBOTest DILUTION_PLATE, EXAMPLE_PERSON); will(returnValue(new ArrayList<SamplePropertyPE>())); - one(daoFactory).getPermIdDAO(); - will(returnValue(permIdDAO)); - one(permIdDAO).createPermId(); will(returnValue("2009010112341234-1")); - one(relationshipService).assignSampleToContainer( - with(any(IAuthSession.class)), with(any(SamplePE.class)), - with(any(SamplePE.class))); + one(relationshipService).assignSampleToContainer(with(any(IAuthSession.class)), + with(any(SamplePE.class)), with(any(SamplePE.class))); - one(relationshipService).addParentToSample( - with(any(IAuthSession.class)), with(any(SamplePE.class)), - with(any(SamplePE.class))); + one(relationshipService).addParentToSample(with(any(IAuthSession.class)), + with(any(SamplePE.class)), with(any(SamplePE.class))); } }); @@ -571,9 +563,8 @@ public final class SampleBOTest extends AbstractBOTest allowing(relationshipService).removeSampleFromContainer( with(any(IAuthSession.class)), with(any(SamplePE.class))); - one(relationshipService).addParentToSample( - with(any(IAuthSession.class)), with(any(SamplePE.class)), - with(any(SamplePE.class))); + one(relationshipService).addParentToSample(with(any(IAuthSession.class)), + with(any(SamplePE.class)), with(any(SamplePE.class))); } }); @@ -706,8 +697,8 @@ public final class SampleBOTest extends AbstractBOTest allowing(relationshipService).unassignSampleFromExperiment( with(any(IAuthSession.class)), with(any(SamplePE.class))); - allowing(spaceDAO).tryFindSpaceByCodeAndDatabaseInstance( - with("MY_GROUP"), with(any(DatabaseInstancePE.class))); + allowing(spaceDAO).tryFindSpaceByCodeAndDatabaseInstance(with("MY_GROUP"), + with(any(DatabaseInstancePE.class))); will(returnValue(EXAMPLE_GROUP)); allowing(sampleDAO).tryFindByCodeAndSpace(with("sampleCode"), @@ -724,8 +715,7 @@ public final class SampleBOTest extends AbstractBOTest createSampleBO().update( new SampleUpdatesDTO(SAMPLE_TECH_ID, null, null, Collections .<NewAttachment> emptyList(), now, IdentifierHelper.sample(sample), - container.getSampleIdentifier() - .toString(), null)); + container.getSampleIdentifier().toString(), null)); context.assertIsSatisfied(); } @@ -764,8 +754,8 @@ public final class SampleBOTest extends AbstractBOTest allowing(relationshipService).unassignSampleFromExperiment( with(any(IAuthSession.class)), with(any(SamplePE.class))); - allowing(spaceDAO).tryFindSpaceByCodeAndDatabaseInstance( - with("MY_GROUP"), with(any(DatabaseInstancePE.class))); + allowing(spaceDAO).tryFindSpaceByCodeAndDatabaseInstance(with("MY_GROUP"), + with(any(DatabaseInstancePE.class))); will(returnValue(EXAMPLE_GROUP)); allowing(sampleDAO).tryFindByCodeAndSpace(with("sampleCode"), @@ -780,8 +770,8 @@ public final class SampleBOTest extends AbstractBOTest assertNull(sample.getContainer()); SampleBO bo = createSampleBO(); bo.update(new SampleUpdatesDTO(SAMPLE_TECH_ID, null, null, Collections - .<NewAttachment> emptyList(), now, IdentifierHelper.sample(sample), - container.getSampleIdentifier().toString(), null)); + .<NewAttachment> emptyList(), now, IdentifierHelper.sample(sample), container + .getSampleIdentifier().toString(), null)); bo.save(); context.assertIsSatisfied(); } @@ -889,9 +879,6 @@ public final class SampleBOTest extends AbstractBOTest DILUTION_PLATE, EXAMPLE_PERSON); will(returnValue(new ArrayList<SamplePropertyPE>())); - one(daoFactory).getPermIdDAO(); - will(returnValue(permIdDAO)); - one(permIdDAO).createPermId(); will(returnValue("2009010112341234-1")); }