Skip to content
Snippets Groups Projects
Commit 3f715eb7 authored by vkovtun's avatar vkovtun
Browse files

SSDM-13256: Added missing columns for sample types.

parent 12e45369
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Showing
with 89 additions and 1 deletion
...@@ -19,6 +19,8 @@ import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.AUTO_GENER ...@@ -19,6 +19,8 @@ import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.AUTO_GENER
import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.CODE; import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.CODE;
import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.DESCRIPTION; import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.DESCRIPTION;
import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.GENERATED_CODE_PREFIX; import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.GENERATED_CODE_PREFIX;
import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.MODIFICATION_DATE;
import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.UNIQUE_SUBCODES;
import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.VALIDATION_SCRIPT; import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.VALIDATION_SCRIPT;
import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.VERSION; import static ch.ethz.sis.openbis.generic.server.xls.export.Attribute.VERSION;
...@@ -72,7 +74,7 @@ public class XLSSampleTypeExportHelper extends AbstractXLSEntityTypeExportHelper ...@@ -72,7 +74,7 @@ public class XLSSampleTypeExportHelper extends AbstractXLSEntityTypeExportHelper
protected Attribute[] getAttributes(final SampleType sampleType) protected Attribute[] getAttributes(final SampleType sampleType)
{ {
return new Attribute[] { VERSION, CODE, DESCRIPTION, AUTO_GENERATE_CODES, VALIDATION_SCRIPT, return new Attribute[] { VERSION, CODE, DESCRIPTION, AUTO_GENERATE_CODES, VALIDATION_SCRIPT,
GENERATED_CODE_PREFIX }; GENERATED_CODE_PREFIX, UNIQUE_SUBCODES, MODIFICATION_DATE };
} }
@Override @Override
...@@ -107,6 +109,14 @@ public class XLSSampleTypeExportHelper extends AbstractXLSEntityTypeExportHelper ...@@ -107,6 +109,14 @@ public class XLSSampleTypeExportHelper extends AbstractXLSEntityTypeExportHelper
{ {
return sampleType.isAutoGeneratedCode().toString().toUpperCase(); return sampleType.isAutoGeneratedCode().toString().toUpperCase();
} }
case UNIQUE_SUBCODES:
{
return sampleType.isSubcodeUnique().toString().toUpperCase();
}
case MODIFICATION_DATE:
{
return DATE_FORMAT.format(sampleType.getModificationDate());
}
default: default:
{ {
return null; return null;
......
...@@ -18,7 +18,9 @@ package ch.ethz.sis.openbis.generic.server.xls.export; ...@@ -18,7 +18,9 @@ package ch.ethz.sis.openbis.generic.server.xls.export;
import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.TEST_SCRIPT_CONTENT; import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.TEST_SCRIPT_CONTENT;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -57,6 +59,11 @@ class SampleTypeExpectations extends Expectations ...@@ -57,6 +59,11 @@ class SampleTypeExpectations extends Expectations
final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2); final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2);
final PluginFetchOptions pluginFetchOptions = fetchOptions.withValidationPlugin(); final PluginFetchOptions pluginFetchOptions = fetchOptions.withValidationPlugin();
final Calendar calendar = Calendar.getInstance();
calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44);
final Date modificationDate = calendar.getTime();
final SampleType sampleType = new SampleType(); final SampleType sampleType = new SampleType();
sampleType.setFetchOptions(fetchOptions); sampleType.setFetchOptions(fetchOptions);
sampleType.setPermId(new EntityTypePermId("ENTRY", EntityKind.SAMPLE)); sampleType.setPermId(new EntityTypePermId("ENTRY", EntityKind.SAMPLE));
...@@ -65,6 +72,8 @@ class SampleTypeExpectations extends Expectations ...@@ -65,6 +72,8 @@ class SampleTypeExpectations extends Expectations
sampleType.setAutoGeneratedCode(true); sampleType.setAutoGeneratedCode(true);
sampleType.setGeneratedCodePrefix("ENTRY"); sampleType.setGeneratedCodePrefix("ENTRY");
sampleType.setPropertyAssignments(getPropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getPropertyAssignments(fetchOptions));
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
final Plugin validationPlugin = new Plugin(); final Plugin validationPlugin = new Plugin();
validationPlugin.setName("test"); validationPlugin.setName("test");
......
...@@ -18,7 +18,9 @@ package ch.ethz.sis.openbis.generic.server.xls.export; ...@@ -18,7 +18,9 @@ package ch.ethz.sis.openbis.generic.server.xls.export;
import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.DATE_RANGE_VALIDATION_SCRIPT_CONTENT; import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.DATE_RANGE_VALIDATION_SCRIPT_CONTENT;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
import org.jmock.Expectations; import org.jmock.Expectations;
...@@ -59,6 +61,11 @@ class SampleTypeWithBareSamplePropertyExpectations extends Expectations ...@@ -59,6 +61,11 @@ class SampleTypeWithBareSamplePropertyExpectations extends Expectations
@Override @Override
public Object invoke(final Invocation invocation) throws Throwable public Object invoke(final Invocation invocation) throws Throwable
{ {
final Calendar calendar = Calendar.getInstance();
calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44);
final Date modificationDate = calendar.getTime();
final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2); final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2);
final SampleType sampleType = new SampleType(); final SampleType sampleType = new SampleType();
sampleType.setFetchOptions(fetchOptions); sampleType.setFetchOptions(fetchOptions);
...@@ -67,6 +74,9 @@ class SampleTypeWithBareSamplePropertyExpectations extends Expectations ...@@ -67,6 +74,9 @@ class SampleTypeWithBareSamplePropertyExpectations extends Expectations
sampleType.setDescription("Course"); sampleType.setDescription("Course");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setPropertyAssignments(getCoursePropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getCoursePropertyAssignments(fetchOptions));
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
final Plugin validationPlugin = new Plugin(); final Plugin validationPlugin = new Plugin();
validationPlugin.setFetchOptions(fetchOptions.withValidationPlugin()); validationPlugin.setFetchOptions(fetchOptions.withValidationPlugin());
validationPlugin.setName("date_range_validation"); validationPlugin.setName("date_range_validation");
......
...@@ -18,7 +18,9 @@ package ch.ethz.sis.openbis.generic.server.xls.export; ...@@ -18,7 +18,9 @@ package ch.ethz.sis.openbis.generic.server.xls.export;
import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.DATE_RANGE_VALIDATION_SCRIPT_CONTENT; import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.DATE_RANGE_VALIDATION_SCRIPT_CONTENT;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
import org.jmock.Expectations; import org.jmock.Expectations;
...@@ -42,6 +44,11 @@ class SampleTypeWithChainedSamplePropertiesExpectations extends Expectations ...@@ -42,6 +44,11 @@ class SampleTypeWithChainedSamplePropertiesExpectations extends Expectations
public SampleTypeWithChainedSamplePropertiesExpectations(final IApplicationServerApi api, public SampleTypeWithChainedSamplePropertiesExpectations(final IApplicationServerApi api,
final boolean exportReferred) final boolean exportReferred)
{ {
final Calendar calendar = Calendar.getInstance();
calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44);
final Date modificationDate = calendar.getTime();
if (exportReferred) if (exportReferred)
{ {
allowing(api).getSampleTypes(with(XLSExportTest.SESSION_TOKEN), with(new CollectionMatcher<>( allowing(api).getSampleTypes(with(XLSExportTest.SESSION_TOKEN), with(new CollectionMatcher<>(
...@@ -61,7 +68,10 @@ class SampleTypeWithChainedSamplePropertiesExpectations extends Expectations ...@@ -61,7 +68,10 @@ class SampleTypeWithChainedSamplePropertiesExpectations extends Expectations
sampleType.setCode("DEPARTMENT"); sampleType.setCode("DEPARTMENT");
sampleType.setDescription("Department"); sampleType.setDescription("Department");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getDepartmentPropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getDepartmentPropertyAssignments(fetchOptions));
return Collections.singletonMap(sampleType.getPermId(), sampleType); return Collections.singletonMap(sampleType.getPermId(), sampleType);
} }
...@@ -84,6 +94,8 @@ class SampleTypeWithChainedSamplePropertiesExpectations extends Expectations ...@@ -84,6 +94,8 @@ class SampleTypeWithChainedSamplePropertiesExpectations extends Expectations
sampleType.setCode("PERSON"); sampleType.setCode("PERSON");
sampleType.setDescription("Person"); sampleType.setDescription("Person");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getPersonPropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getPersonPropertyAssignments(fetchOptions));
return Collections.singletonMap(sampleType.getPermId(), sampleType); return Collections.singletonMap(sampleType.getPermId(), sampleType);
} }
...@@ -108,6 +120,8 @@ class SampleTypeWithChainedSamplePropertiesExpectations extends Expectations ...@@ -108,6 +120,8 @@ class SampleTypeWithChainedSamplePropertiesExpectations extends Expectations
sampleType.setCode("COURSE"); sampleType.setCode("COURSE");
sampleType.setDescription("Course"); sampleType.setDescription("Course");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getCoursePropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getCoursePropertyAssignments(fetchOptions));
final Plugin validationPlugin = new Plugin(); final Plugin validationPlugin = new Plugin();
validationPlugin.setFetchOptions(fetchOptions.withValidationPlugin()); validationPlugin.setFetchOptions(fetchOptions.withValidationPlugin());
......
...@@ -18,7 +18,9 @@ package ch.ethz.sis.openbis.generic.server.xls.export; ...@@ -18,7 +18,9 @@ package ch.ethz.sis.openbis.generic.server.xls.export;
import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.DATE_RANGE_VALIDATION_SCRIPT_CONTENT; import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.DATE_RANGE_VALIDATION_SCRIPT_CONTENT;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
import org.jmock.Expectations; import org.jmock.Expectations;
...@@ -42,6 +44,11 @@ class SampleTypeWithCyclicSamplePropertiesExpectations extends Expectations ...@@ -42,6 +44,11 @@ class SampleTypeWithCyclicSamplePropertiesExpectations extends Expectations
public SampleTypeWithCyclicSamplePropertiesExpectations(final IApplicationServerApi api, public SampleTypeWithCyclicSamplePropertiesExpectations(final IApplicationServerApi api,
final boolean exportReferred) final boolean exportReferred)
{ {
final Calendar calendar = Calendar.getInstance();
calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44);
final Date modificationDate = calendar.getTime();
if (exportReferred) if (exportReferred)
{ {
allowing(api).getSampleTypes(with(XLSExportTest.SESSION_TOKEN), with(new CollectionMatcher<>( allowing(api).getSampleTypes(with(XLSExportTest.SESSION_TOKEN), with(new CollectionMatcher<>(
...@@ -61,6 +68,8 @@ class SampleTypeWithCyclicSamplePropertiesExpectations extends Expectations ...@@ -61,6 +68,8 @@ class SampleTypeWithCyclicSamplePropertiesExpectations extends Expectations
sampleType.setCode("DEPARTMENT"); sampleType.setCode("DEPARTMENT");
sampleType.setDescription("Department"); sampleType.setDescription("Department");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getDepartmentPropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getDepartmentPropertyAssignments(fetchOptions));
return Collections.singletonMap(sampleType.getPermId(), sampleType); return Collections.singletonMap(sampleType.getPermId(), sampleType);
} }
...@@ -84,6 +93,8 @@ class SampleTypeWithCyclicSamplePropertiesExpectations extends Expectations ...@@ -84,6 +93,8 @@ class SampleTypeWithCyclicSamplePropertiesExpectations extends Expectations
sampleType.setCode("PERSON"); sampleType.setCode("PERSON");
sampleType.setDescription("Person"); sampleType.setDescription("Person");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getPersonPropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getPersonPropertyAssignments(fetchOptions));
return Collections.singletonMap(sampleType.getPermId(), sampleType); return Collections.singletonMap(sampleType.getPermId(), sampleType);
} }
...@@ -108,6 +119,8 @@ class SampleTypeWithCyclicSamplePropertiesExpectations extends Expectations ...@@ -108,6 +119,8 @@ class SampleTypeWithCyclicSamplePropertiesExpectations extends Expectations
sampleType.setCode("COURSE"); sampleType.setCode("COURSE");
sampleType.setDescription("Course"); sampleType.setDescription("Course");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getCoursePropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getCoursePropertyAssignments(fetchOptions));
final Plugin validationPlugin = new Plugin(); final Plugin validationPlugin = new Plugin();
validationPlugin.setFetchOptions(fetchOptions.withValidationPlugin()); validationPlugin.setFetchOptions(fetchOptions.withValidationPlugin());
......
...@@ -19,7 +19,9 @@ import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.DATE_R ...@@ -19,7 +19,9 @@ import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.DATE_R
import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.TEST_SCRIPT_CONTENT; import static ch.ethz.sis.openbis.generic.server.xls.export.XLSExportData.TEST_SCRIPT_CONTENT;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
import org.jmock.Expectations; import org.jmock.Expectations;
...@@ -56,6 +58,11 @@ class SampleTypeWithSamplePropertyExpectations extends Expectations ...@@ -56,6 +58,11 @@ class SampleTypeWithSamplePropertyExpectations extends Expectations
@Override @Override
public Object invoke(final Invocation invocation) throws Throwable public Object invoke(final Invocation invocation) throws Throwable
{ {
final Calendar calendar = Calendar.getInstance();
calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44);
final Date modificationDate = calendar.getTime();
final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2); final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2);
final SampleType sampleType = new SampleType(); final SampleType sampleType = new SampleType();
sampleType.setFetchOptions(fetchOptions); sampleType.setFetchOptions(fetchOptions);
...@@ -63,6 +70,8 @@ class SampleTypeWithSamplePropertyExpectations extends Expectations ...@@ -63,6 +70,8 @@ class SampleTypeWithSamplePropertyExpectations extends Expectations
sampleType.setCode("PERSON"); sampleType.setCode("PERSON");
sampleType.setDescription("Person"); sampleType.setDescription("Person");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getPersonPropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getPersonPropertyAssignments(fetchOptions));
return Collections.singletonMap(sampleType.getPermId(), sampleType); return Collections.singletonMap(sampleType.getPermId(), sampleType);
} }
...@@ -80,6 +89,11 @@ class SampleTypeWithSamplePropertyExpectations extends Expectations ...@@ -80,6 +89,11 @@ class SampleTypeWithSamplePropertyExpectations extends Expectations
@Override @Override
public Object invoke(final Invocation invocation) throws Throwable public Object invoke(final Invocation invocation) throws Throwable
{ {
final Calendar calendar = Calendar.getInstance();
calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44);
final Date modificationDate = calendar.getTime();
final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2); final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2);
final SampleType sampleType = new SampleType(); final SampleType sampleType = new SampleType();
sampleType.setFetchOptions(fetchOptions); sampleType.setFetchOptions(fetchOptions);
...@@ -87,6 +101,8 @@ class SampleTypeWithSamplePropertyExpectations extends Expectations ...@@ -87,6 +101,8 @@ class SampleTypeWithSamplePropertyExpectations extends Expectations
sampleType.setCode("COURSE"); sampleType.setCode("COURSE");
sampleType.setDescription("Course"); sampleType.setDescription("Course");
sampleType.setAutoGeneratedCode(false); sampleType.setAutoGeneratedCode(false);
sampleType.setSubcodeUnique(true);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getCoursePropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getCoursePropertyAssignments(fetchOptions));
final Plugin validationPlugin = new Plugin(); final Plugin validationPlugin = new Plugin();
validationPlugin.setFetchOptions(fetchOptions.withValidationPlugin()); validationPlugin.setFetchOptions(fetchOptions.withValidationPlugin());
......
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
package ch.ethz.sis.openbis.generic.server.xls.export; package ch.ethz.sis.openbis.generic.server.xls.export;
import java.util.Arrays; import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections; import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
import org.jmock.Expectations; import org.jmock.Expectations;
...@@ -55,6 +57,11 @@ class SampleTypeWithVocabularyPropertyExpectations extends Expectations ...@@ -55,6 +57,11 @@ class SampleTypeWithVocabularyPropertyExpectations extends Expectations
@Override @Override
public Object invoke(final Invocation invocation) throws Throwable public Object invoke(final Invocation invocation) throws Throwable
{ {
final Calendar calendar = Calendar.getInstance();
calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44);
final Date modificationDate = calendar.getTime();
final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2); final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2);
final SampleType sampleType = new SampleType(); final SampleType sampleType = new SampleType();
sampleType.setFetchOptions(fetchOptions); sampleType.setFetchOptions(fetchOptions);
...@@ -63,6 +70,8 @@ class SampleTypeWithVocabularyPropertyExpectations extends Expectations ...@@ -63,6 +70,8 @@ class SampleTypeWithVocabularyPropertyExpectations extends Expectations
sampleType.setDescription("Antibody"); sampleType.setDescription("Antibody");
sampleType.setAutoGeneratedCode(true); sampleType.setAutoGeneratedCode(true);
sampleType.setGeneratedCodePrefix("ANT"); sampleType.setGeneratedCodePrefix("ANT");
sampleType.setSubcodeUnique(false);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getPropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getPropertyAssignments(fetchOptions));
return Collections.singletonMap(sampleType.getPermId(), sampleType); return Collections.singletonMap(sampleType.getPermId(), sampleType);
} }
...@@ -79,6 +88,11 @@ class SampleTypeWithVocabularyPropertyExpectations extends Expectations ...@@ -79,6 +88,11 @@ class SampleTypeWithVocabularyPropertyExpectations extends Expectations
@Override @Override
public Object invoke(final Invocation invocation) throws Throwable public Object invoke(final Invocation invocation) throws Throwable
{ {
final Calendar calendar = Calendar.getInstance();
calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44);
final Date modificationDate = calendar.getTime();
final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2); final SampleTypeFetchOptions fetchOptions = (SampleTypeFetchOptions) invocation.getParameter(2);
final SampleType sampleType = new SampleType(); final SampleType sampleType = new SampleType();
sampleType.setFetchOptions(fetchOptions); sampleType.setFetchOptions(fetchOptions);
...@@ -87,6 +101,8 @@ class SampleTypeWithVocabularyPropertyExpectations extends Expectations ...@@ -87,6 +101,8 @@ class SampleTypeWithVocabularyPropertyExpectations extends Expectations
sampleType.setDescription("Virus"); sampleType.setDescription("Virus");
sampleType.setAutoGeneratedCode(true); sampleType.setAutoGeneratedCode(true);
sampleType.setGeneratedCodePrefix("VIR"); sampleType.setGeneratedCodePrefix("VIR");
sampleType.setSubcodeUnique(false);
sampleType.setModificationDate(modificationDate);
sampleType.setPropertyAssignments(getPropertyAssignments(fetchOptions)); sampleType.setPropertyAssignments(getPropertyAssignments(fetchOptions));
return Collections.singletonMap(sampleType.getPermId(), sampleType); return Collections.singletonMap(sampleType.getPermId(), sampleType);
} }
......
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