Skip to content
Snippets Groups Projects
Commit 18108d1b authored by felmer's avatar felmer
Browse files

test fixed

SVN: 26371
parent cc8b48ce
No related branches found
No related tags found
No related merge requests found
...@@ -184,9 +184,6 @@ public final class SampleBOTest extends AbstractBOTest ...@@ -184,9 +184,6 @@ public final class SampleBOTest extends AbstractBOTest
set.add(samplePropertyPE); set.add(samplePropertyPE);
will(returnValue(set)); will(returnValue(set));
one(daoFactory).getPermIdDAO();
will(returnValue(permIdDAO));
one(permIdDAO).createPermId(); one(permIdDAO).createPermId();
will(returnValue("2009010112341234-1")); will(returnValue("2009010112341234-1"));
...@@ -309,19 +306,14 @@ public final class SampleBOTest extends AbstractBOTest ...@@ -309,19 +306,14 @@ public final class SampleBOTest extends AbstractBOTest
DILUTION_PLATE, EXAMPLE_PERSON); DILUTION_PLATE, EXAMPLE_PERSON);
will(returnValue(new ArrayList<SamplePropertyPE>())); will(returnValue(new ArrayList<SamplePropertyPE>()));
one(daoFactory).getPermIdDAO();
will(returnValue(permIdDAO));
one(permIdDAO).createPermId(); one(permIdDAO).createPermId();
will(returnValue("2009010112341234-1")); will(returnValue("2009010112341234-1"));
one(relationshipService).assignSampleToContainer( one(relationshipService).assignSampleToContainer(with(any(IAuthSession.class)),
with(any(IAuthSession.class)), with(any(SamplePE.class)), with(any(SamplePE.class)), with(any(SamplePE.class)));
with(any(SamplePE.class)));
one(relationshipService).addParentToSample( one(relationshipService).addParentToSample(with(any(IAuthSession.class)),
with(any(IAuthSession.class)), with(any(SamplePE.class)), with(any(SamplePE.class)), with(any(SamplePE.class)));
with(any(SamplePE.class)));
} }
}); });
...@@ -571,9 +563,8 @@ public final class SampleBOTest extends AbstractBOTest ...@@ -571,9 +563,8 @@ public final class SampleBOTest extends AbstractBOTest
allowing(relationshipService).removeSampleFromContainer( allowing(relationshipService).removeSampleFromContainer(
with(any(IAuthSession.class)), with(any(SamplePE.class))); with(any(IAuthSession.class)), with(any(SamplePE.class)));
one(relationshipService).addParentToSample( one(relationshipService).addParentToSample(with(any(IAuthSession.class)),
with(any(IAuthSession.class)), with(any(SamplePE.class)), with(any(SamplePE.class)), with(any(SamplePE.class)));
with(any(SamplePE.class)));
} }
}); });
...@@ -706,8 +697,8 @@ public final class SampleBOTest extends AbstractBOTest ...@@ -706,8 +697,8 @@ public final class SampleBOTest extends AbstractBOTest
allowing(relationshipService).unassignSampleFromExperiment( allowing(relationshipService).unassignSampleFromExperiment(
with(any(IAuthSession.class)), with(any(SamplePE.class))); with(any(IAuthSession.class)), with(any(SamplePE.class)));
allowing(spaceDAO).tryFindSpaceByCodeAndDatabaseInstance( allowing(spaceDAO).tryFindSpaceByCodeAndDatabaseInstance(with("MY_GROUP"),
with("MY_GROUP"), with(any(DatabaseInstancePE.class))); with(any(DatabaseInstancePE.class)));
will(returnValue(EXAMPLE_GROUP)); will(returnValue(EXAMPLE_GROUP));
allowing(sampleDAO).tryFindByCodeAndSpace(with("sampleCode"), allowing(sampleDAO).tryFindByCodeAndSpace(with("sampleCode"),
...@@ -724,8 +715,7 @@ public final class SampleBOTest extends AbstractBOTest ...@@ -724,8 +715,7 @@ public final class SampleBOTest extends AbstractBOTest
createSampleBO().update( createSampleBO().update(
new SampleUpdatesDTO(SAMPLE_TECH_ID, null, null, Collections new SampleUpdatesDTO(SAMPLE_TECH_ID, null, null, Collections
.<NewAttachment> emptyList(), now, IdentifierHelper.sample(sample), .<NewAttachment> emptyList(), now, IdentifierHelper.sample(sample),
container.getSampleIdentifier() container.getSampleIdentifier().toString(), null));
.toString(), null));
context.assertIsSatisfied(); context.assertIsSatisfied();
} }
...@@ -764,8 +754,8 @@ public final class SampleBOTest extends AbstractBOTest ...@@ -764,8 +754,8 @@ public final class SampleBOTest extends AbstractBOTest
allowing(relationshipService).unassignSampleFromExperiment( allowing(relationshipService).unassignSampleFromExperiment(
with(any(IAuthSession.class)), with(any(SamplePE.class))); with(any(IAuthSession.class)), with(any(SamplePE.class)));
allowing(spaceDAO).tryFindSpaceByCodeAndDatabaseInstance( allowing(spaceDAO).tryFindSpaceByCodeAndDatabaseInstance(with("MY_GROUP"),
with("MY_GROUP"), with(any(DatabaseInstancePE.class))); with(any(DatabaseInstancePE.class)));
will(returnValue(EXAMPLE_GROUP)); will(returnValue(EXAMPLE_GROUP));
allowing(sampleDAO).tryFindByCodeAndSpace(with("sampleCode"), allowing(sampleDAO).tryFindByCodeAndSpace(with("sampleCode"),
...@@ -780,8 +770,8 @@ public final class SampleBOTest extends AbstractBOTest ...@@ -780,8 +770,8 @@ public final class SampleBOTest extends AbstractBOTest
assertNull(sample.getContainer()); assertNull(sample.getContainer());
SampleBO bo = createSampleBO(); SampleBO bo = createSampleBO();
bo.update(new SampleUpdatesDTO(SAMPLE_TECH_ID, null, null, Collections bo.update(new SampleUpdatesDTO(SAMPLE_TECH_ID, null, null, Collections
.<NewAttachment> emptyList(), now, IdentifierHelper.sample(sample), .<NewAttachment> emptyList(), now, IdentifierHelper.sample(sample), container
container.getSampleIdentifier().toString(), null)); .getSampleIdentifier().toString(), null));
bo.save(); bo.save();
context.assertIsSatisfied(); context.assertIsSatisfied();
} }
...@@ -889,9 +879,6 @@ public final class SampleBOTest extends AbstractBOTest ...@@ -889,9 +879,6 @@ public final class SampleBOTest extends AbstractBOTest
DILUTION_PLATE, EXAMPLE_PERSON); DILUTION_PLATE, EXAMPLE_PERSON);
will(returnValue(new ArrayList<SamplePropertyPE>())); will(returnValue(new ArrayList<SamplePropertyPE>()));
one(daoFactory).getPermIdDAO();
will(returnValue(permIdDAO));
one(permIdDAO).createPermId(); one(permIdDAO).createPermId();
will(returnValue("2009010112341234-1")); will(returnValue("2009010112341234-1"));
} }
......
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