use of com.epam.pipeline.entity.metadata.PipeConfValue in project cloud-pipeline by epam.
the class MetadataEntityConverterTest method shouldFailWithMissingColumnInData.
@Test(expected = IllegalStateException.class)
public void shouldFailWithMissingColumnInData() {
Map<String, PipeConfValue> participantData1 = new HashMap<>();
participantData1.put(TEST_ARGUMENT1, new PipeConfValue(STRING_TYPE, TEST_VALUE_1));
participantData1.put(TEST_ARGUMENT2, new PipeConfValue(STRING_TYPE, "F"));
MetadataEntity participant1 = getEntity(participantClass, PARTICIPANT_ENTITY_ID1, participantData1);
Map<String, PipeConfValue> participantData2 = new HashMap<>();
participantData2.put(TEST_ARGUMENT2, new PipeConfValue(STRING_TYPE, "M"));
MetadataEntity participant2 = getEntity(participantClass, PARTICIPANT_ENTITY_ID2, participantData2);
List<MetadataEntity> entities = new ArrayList<>();
entities.add(participant1);
entities.add(participant2);
MetadataEntityConverter.convert(entities);
}
use of com.epam.pipeline.entity.metadata.PipeConfValue in project cloud-pipeline by epam.
the class MetadataEntityConverterTest method shouldFailIfPairSetWithoutPairs.
@Test(expected = IllegalStateException.class)
public void shouldFailIfPairSetWithoutPairs() {
Map<String, PipeConfValue> pairSetData = new HashMap<>();
pairSetData.put(TEST_ARGUMENT1, new PipeConfValue(STRING_TYPE, TEST_VALUE_2));
MetadataEntity pairSet = getEntity(pairSetClass, "HCC_pairs", pairSetData);
MetadataEntityConverter.convert(Collections.singletonList(pairSet));
}
use of com.epam.pipeline.entity.metadata.PipeConfValue in project cloud-pipeline by epam.
the class MetadataEntityConverterTest method shouldFailIfSampleSetWithoutSamples.
@Test(expected = IllegalStateException.class)
public void shouldFailIfSampleSetWithoutSamples() {
Map<String, PipeConfValue> sampleSetData = new HashMap<>();
sampleSetData.put(TEST_ARGUMENT1, new PipeConfValue(STRING_TYPE, TEST_VALUE_2));
MetadataEntity sampleSet = getEntity(sampleSetClass, "HCC_samples", sampleSetData);
MetadataEntityConverter.convert(Collections.singletonList(sampleSet));
}
use of com.epam.pipeline.entity.metadata.PipeConfValue in project cloud-pipeline by epam.
the class MetadataEntityConverterTest method shouldFailIfPairWithoutControlSampleAttribute.
@Test(expected = IllegalArgumentException.class)
public void shouldFailIfPairWithoutControlSampleAttribute() {
Map<String, PipeConfValue> pairData = new HashMap<>();
pairData.put(PARTICIPANT_TYPE_NAME, new PipeConfValue(PARTICIPANT_TYPE_NAME, PARTICIPANT_ENTITY_ID1));
pairData.put(CASE_SAMPLE_ARGUMENT, new PipeConfValue(SAMPLE_ATTRIBUTE_TYPE, SAMPLE_ENTITY_ID2));
MetadataEntity pair = getEntity(pairClass, PAIR_ENTITY_ID1, pairData);
MetadataEntityConverter.convert(Collections.singletonList(pair));
}
use of com.epam.pipeline.entity.metadata.PipeConfValue in project cloud-pipeline by epam.
the class MetadataEntityConverterTest method shouldFailWithInconsistentData.
@Test(expected = IllegalStateException.class)
public void shouldFailWithInconsistentData() {
Map<String, PipeConfValue> participantData1 = new HashMap<>();
participantData1.put(TEST_ARGUMENT1, new PipeConfValue(STRING_TYPE, TEST_VALUE_1));
MetadataEntity participant1 = getEntity(participantClass, PARTICIPANT_ENTITY_ID1, participantData1);
Map<String, PipeConfValue> participantData2 = new HashMap<>();
participantData2.put(TEST_ARGUMENT2, new PipeConfValue(STRING_TYPE, "M"));
MetadataEntity participant2 = getEntity(participantClass, PARTICIPANT_ENTITY_ID2, participantData2);
List<MetadataEntity> entities = new ArrayList<>();
entities.add(participant1);
entities.add(participant2);
MetadataEntityConverter.convert(entities);
}
Aggregations