Skip to content
Snippets Groups Projects
Commit 9b2d322a authored by ribeaudc's avatar ribeaudc
Browse files

[LMS-660] change: - Currently existing plug-in for DILUTION_PLATE to be for MASTER_PLATE instead.

SVN: 9085
parent f82315db
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,6 @@
package ch.systemsx.cisd.openbis.plugin.generic.client.web.client.application;
import java.util.Collections;
import java.util.Set;
import ch.systemsx.cisd.openbis.generic.client.web.client.IGenericClientServiceAsync;
......@@ -69,7 +68,8 @@ public final class ClientPluginFactory extends
public final Set<String> getSampleTypeCodes()
{
return Collections.singleton(SampleTypeCode.CONTROL_LAYOUT.getCode());
throw new UnsupportedOperationException(
"Generic plugin factory supports every sample type.");
}
//
......
......@@ -73,7 +73,7 @@ public final class ClientPluginFactory extends
public final Set<String> getSampleTypeCodes()
{
return Collections.singleton(SampleTypeCode.DILUTION_PLATE.getCode());
return Collections.singleton(SampleTypeCode.MASTER_PLATE.getCode());
}
//
......@@ -89,8 +89,8 @@ public final class ClientPluginFactory extends
public final ITabItem createSampleViewer(final String sampleIdentifier)
{
final IViewContext<IScreeningClientServiceAsync> viewContext = getViewContext();
final ScreeningSampleViewer sampleViewer = new ScreeningSampleViewer(viewContext,
sampleIdentifier);
final ScreeningSampleViewer sampleViewer =
new ScreeningSampleViewer(viewContext, sampleIdentifier);
return new DefaultTabItem(sampleIdentifier, sampleViewer)
{
......
......@@ -25,7 +25,7 @@ import ch.systemsx.cisd.openbis.plugin.SampleServerPluginRegistry;
import ch.systemsx.cisd.openbis.plugin.screening.shared.ResourceNames;
/**
* The {@link ISampleServerPlugin} implementation for <i>Cell Plate</i> plates.
* The {@link ISampleServerPlugin} implementation for plates of type <code>MASTER_PLATE</code>.
* <p>
* This class is annotated with {@link Component} so that it automatically gets registered to
* {@link SampleServerPluginRegistry} by <i>Spring</i>.
......@@ -33,12 +33,12 @@ import ch.systemsx.cisd.openbis.plugin.screening.shared.ResourceNames;
*
* @author Christian Ribeaud
*/
@Component(ResourceNames.DILUTION_PLATE_SAMPLE_SERVER_PLUGIN)
public final class DilutionPlateSampleServerPlugin extends AbstractSampleServerPlugin
@Component(ResourceNames.MASTER_PLATE_SAMPLE_SERVER_PLUGIN)
public final class MasterPlateSampleServerPlugin extends AbstractSampleServerPlugin
{
private static final String DILUTION_PLATE_TYPE_CODE = "DILUTION_PLATE";
private static final String MASTER_PLATE_TYPE_CODE = "MASTER_PLATE";
private DilutionPlateSampleServerPlugin()
private MasterPlateSampleServerPlugin()
{
}
......@@ -48,7 +48,7 @@ public final class DilutionPlateSampleServerPlugin extends AbstractSampleServerP
public final String getSampleTypeCode()
{
return DILUTION_PLATE_TYPE_CODE;
return MASTER_PLATE_TYPE_CODE;
}
public final ISampleTypeSlaveServerPlugin getSlaveServer()
......
......@@ -32,6 +32,6 @@ public final class ResourceNames
public final static String SCREENING_SERVER = "screening-server";
public final static String DILUTION_PLATE_SAMPLE_SERVER_PLUGIN =
"dilution-plate-sample-server-plugin";
public final static String MASTER_PLATE_SAMPLE_SERVER_PLUGIN =
"master-plate-sample-server-plugin";
}
......@@ -40,7 +40,7 @@ public class GenericSampleViewerTest extends AbstractGWTTestCase
{
private static final String GROUP_IDENTIFIER = "CISD:/CISD";
private static final String MASTER_PLATE_EXAMPLE = "MP1-MIXED";
private static final String CONTROL_LAYOUT_EXAMPLE = "CL1";
private static final String CELL_PLATE_EXAMPLE = "3VCP1";
......@@ -49,21 +49,19 @@ public class GenericSampleViewerTest extends AbstractGWTTestCase
remoteConsole.prepare(new Login("test", "a"));
remoteConsole.prepare(new OpenTab(CategoriesBuilder.CATEGORIES.SAMPLES,
CategoriesBuilder.MENU_ELEMENTS.LIST));
remoteConsole.prepare(new ListSamples(true, true, "CISD", "MASTER_PLATE"));
remoteConsole.prepare(new ShowSample(MASTER_PLATE_EXAMPLE));
CheckSample checkSample = new CheckSample(GROUP_IDENTIFIER, MASTER_PLATE_EXAMPLE);
checkSample.property("Sample").asString(MASTER_PLATE_EXAMPLE);
checkSample.property("Sample Type").asCode("MASTER_PLATE");
remoteConsole.prepare(new ListSamples(true, true, "CISD", "CONTROL_LAYOUT"));
remoteConsole.prepare(new ShowSample(CONTROL_LAYOUT_EXAMPLE));
final CheckSample checkSample = new CheckSample(GROUP_IDENTIFIER, CONTROL_LAYOUT_EXAMPLE);
checkSample.property("Sample").asString(CONTROL_LAYOUT_EXAMPLE);
checkSample.property("Sample Type").asCode("CONTROL_LAYOUT");
checkSample.property("Registrator").asPerson("Doe, John");
checkSample.property("Generated Samples").asGeneratedSamples("DP1-A [DILUTION_PLATE]",
"DP1-B [DILUTION_PLATE]");
checkSample.property("Plate Geometry").asProperty("384_WELLS_16X24");
checkSample.property("Description").asProperty("test control layout");
CheckTableCommand componentsTable = checkSample.componentsTable().expectedSize(4);
final CheckTableCommand componentsTable = checkSample.componentsTable().expectedSize(2);
componentsTable.expectedRow(new Row().withCell(CODE, "A01"));
componentsTable.expectedRow(new Row().withCell(CODE, "A02"));
componentsTable.expectedRow(new Row().withCell(CODE, "A03"));
componentsTable.expectedRow(new Row().withCell(CODE, "B02"));
checkSample.dataTable().expectedSize(0);
remoteConsole.prepare(checkSample);
......@@ -79,14 +77,14 @@ public class GenericSampleViewerTest extends AbstractGWTTestCase
CategoriesBuilder.MENU_ELEMENTS.LIST));
remoteConsole.prepare(new ListSamples(true, true, "CISD", "CELL_PLATE"));
remoteConsole.prepare(new ShowSample(CELL_PLATE_EXAMPLE));
CheckSample checkSample = new CheckSample(GROUP_IDENTIFIER, CELL_PLATE_EXAMPLE);
final CheckSample checkSample = new CheckSample(GROUP_IDENTIFIER, CELL_PLATE_EXAMPLE);
checkSample.property("Sample").asString(CELL_PLATE_EXAMPLE);
checkSample.property("Sample Type").asCode("CELL_PLATE");
checkSample.property("Generated Samples").asGeneratedSamples("3VRP1A [REINFECT_PLATE]",
"3VRP1B [REINFECT_PLATE]");
checkSample.property("Invalidation").by(new IValueAssertion<Invalidation>()
{
public void assertValue(Invalidation invalidation)
public void assertValue(final Invalidation invalidation)
{
assertEquals("Doe", invalidation.getRegistrator().getLastName());
assertEquals("wrong-code", invalidation.getReason());
......@@ -98,7 +96,7 @@ public class GenericSampleViewerTest extends AbstractGWTTestCase
checkSample.property("Parent 2").asInvalidEntity();
checkSample.componentsTable().expectedSize(0);
CheckTableCommand dataTable = checkSample.dataTable().expectedSize(2);
final CheckTableCommand dataTable = checkSample.dataTable().expectedSize(2);
dataTable.expectedRow(new Row().withCell(CODE, "20081105092158673-1").withCell(
FILE_FORMAT_TYPE, "TIFF"));
dataTable.expectedRow(new Row().withCell(CODE, "20081105092159188-3").withCell(LOCATION,
......
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