From 34e12576edb364b4e6dbf42ac5dd441b38bd89c5 Mon Sep 17 00:00:00 2001 From: gpawel <gpawel> Date: Fri, 29 Jul 2011 14:19:57 +0000 Subject: [PATCH] [LMS-2421] fixing unit tests SVN: 22300 --- .../samplelister/SampleListingWorkerTest.java | 25 ++++++++----------- .../api/v1/GeneralInformationServiceTest.java | 2 +- .../078/040=sample_relationships.tsv | 2 ++ 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorkerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorkerTest.java index 7af696cc95e..319bdd30411 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorkerTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorkerTest.java @@ -55,14 +55,14 @@ public class SampleListingWorkerTest extends AbstractDAOTest private final long GRANDPARENT1_ID = 325L; - private final long PARENT2_ID = 977L; + private final long PARENT2_ID = 976L; - private final long GRANDPARENT2_ID = 4L; + private final long GRANDPARENT2_ID = 3L; - private final long CHILD_WITH_2_PARENTS_ID = 984L; + private final long CHILD_WITH_2_PARENTS_ID = 987L; private final Long[] CHILDREN_IDS = - { CHILD_WITH_2_PARENTS_ID, 985L, 986L, 987L, 988L, 989L }; + { 986L, CHILD_WITH_2_PARENTS_ID, 988L, 989L }; private SampleListerDAO sampleListerDAO; @@ -96,8 +96,7 @@ public class SampleListingWorkerTest extends AbstractDAOTest } } - @Test(groups = "broken") - // FIXME LMS-2421 + @Test() public void testListSamplesById() { final LongSet sampleIds = new LongOpenHashSet(); @@ -133,8 +132,7 @@ public class SampleListingWorkerTest extends AbstractDAOTest } } - @Test(groups = "broken") - // FIXME LMS-2421 + @Test() public void testListSamplesForParent() { final ListSampleCriteria baseCriteria = @@ -152,8 +150,7 @@ public class SampleListingWorkerTest extends AbstractDAOTest } } - @Test(groups = "broken") - // FIXME LMS-2421 + @Test() public void testListSamplesForChild() { final ListSampleCriteria baseCriteria = @@ -181,8 +178,7 @@ public class SampleListingWorkerTest extends AbstractDAOTest } } - @Test(groups = "broken") - // FIXME LMS-2421 + @Test() public void testListSamplesForChildren() { final ListSampleCriteria baseCriteria = @@ -210,11 +206,10 @@ public class SampleListingWorkerTest extends AbstractDAOTest } } - @Test(groups = "broken") - // FIXME LMS-2421 + @Test() public void testListSamplesForExperiment() { - final long expId = 2L; + final long expId = 3L; final ListSampleCriteria baseCriteria = ListSampleCriteria.createForExperiment(new TechId(expId)); final ListOrSearchSampleCriteria criteria = new ListOrSearchSampleCriteria(baseCriteria); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java index 9b1cf7636ae..3592859f956 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/api/v1/GeneralInformationServiceTest.java @@ -198,7 +198,7 @@ public class GeneralInformationServiceTest extends SystemTestCase cc.addMatchClause(MatchClause.createAttributeMatch(MatchClauseAttribute.CODE, "3VCP*")); sc.addSubCriteria(SearchSubCriteria.createSampleChildCriteria(cc)); List<Sample> result = generalInformationService.searchForSamples(sessionToken, sc); - assertEquals(1, result.size()); + assertEquals(2, result.size()); } @Test diff --git a/openbis/sourceTest/sql/postgresql/078/040=sample_relationships.tsv b/openbis/sourceTest/sql/postgresql/078/040=sample_relationships.tsv index 1157f74f606..a3f5c810823 100644 --- a/openbis/sourceTest/sql/postgresql/078/040=sample_relationships.tsv +++ b/openbis/sourceTest/sql/postgresql/078/040=sample_relationships.tsv @@ -42,3 +42,5 @@ 32 974 2 982 43 977 1 984 44 1043 1 1042 +45 976 1 987 +46 3 1 976 \ No newline at end of file -- GitLab