Skip to content
Snippets Groups Projects
Commit c5416bd8 authored by cramakri's avatar cramakri
Browse files

LMS-1746 Improved tests.

SVN: 17840
parent 4be3eaf8
No related branches found
No related tags found
No related merge requests found
...@@ -108,7 +108,17 @@ public class GeneralInformationServiceTest extends SystemTestCase ...@@ -108,7 +108,17 @@ public class GeneralInformationServiceTest extends SystemTestCase
} }
@Test @Test
public void testListDataSets() public void testSearchForSamplesByProperty()
{
// Search for Samples first
SearchCriteria sc = new SearchCriteria();
sc.addMatchClause(MatchClause.createPropertyMatch("ORGANISM", "HUMAN"));
List<Sample> result = generalInformationService.searchForSamples(sessionToken, sc);
assertEquals(true, result.size() > 0);
}
@Test
public void testListDataSetsForAllSamples()
{ {
// Search for Samples first // Search for Samples first
SearchCriteria sc = new SearchCriteria(); SearchCriteria sc = new SearchCriteria();
...@@ -126,6 +136,21 @@ public class GeneralInformationServiceTest extends SystemTestCase ...@@ -126,6 +136,21 @@ public class GeneralInformationServiceTest extends SystemTestCase
assertEquals(true, result.size() == 0); assertEquals(true, result.size() == 0);
} }
private static final String DEFAULT_PLATE_GEOMETRY_VALUE = "384_WELLS_16X24";
@Test
public void testSearchForDataSetsByProperty()
{
// Search for Samples first
SearchCriteria sc = new SearchCriteria();
sc.addMatchClause(MatchClause.createPropertyMatch("$PLATE_GEOMETRY",
DEFAULT_PLATE_GEOMETRY_VALUE));
List<Sample> samples = generalInformationService.searchForSamples(sessionToken, sc);
assertEquals(true, samples.size() > 0);
List<DataSet> result = generalInformationService.listDataSets(sessionToken, samples);
assertEquals(true, result.size() == 0);
}
private void checkSpace(String expectedCode, String expectedProjects, String expectedRoles, private void checkSpace(String expectedCode, String expectedProjects, String expectedRoles,
SpaceWithProjectsAndRoleAssignments space) SpaceWithProjectsAndRoleAssignments space)
{ {
......
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