use of com.hartwig.api.model.Run in project pipeline5 by hartwigmedical.
the class DiagnosticSomaticMetadataApiTest method throwsIllegalStateIfNoBucketInRun.
@Test(expected = IllegalStateException.class)
public void throwsIllegalStateIfNoBucketInRun() {
victim = new DiagnosticSomaticMetadataApi(new Run().bucket(null), runApi, sampleApi, publisher, new Anonymizer(Arguments.testDefaults()));
when(pipelineState.status()).thenReturn(PipelineStatus.FAILED);
victim.complete(pipelineState, somaticRunMetadata);
}
use of com.hartwig.api.model.Run in project pipeline5 by hartwigmedical.
the class ResearchMetadataApiTest method setUp.
@Before
public void setUp() throws Exception {
sampleApi = mock(SampleApi.class);
setApi = mock(SetApi.class);
bucket = mock(Bucket.class);
when(bucket.getName()).thenReturn("bucket");
runApi = mock(RunApi.class);
run = new Run().id(RUN_ID);
publisher = mock(Publisher.class);
ObjectMapper objectMapper = ObjectMappers.get();
setResolver = mock(SetResolver.class);
victim = new ResearchMetadataApi(sampleApi, setApi, runApi, Optional.of(run), BIOPSY, Arguments.testDefaults(), new StagedOutputPublisher(setResolver, bucket, publisher, objectMapper, Optional.of(run), Context.RESEARCH, false, true), new Anonymizer(Arguments.testDefaults()));
}
use of com.hartwig.api.model.Run in project pipeline5 by hartwigmedical.
the class StagedOutputPublisherTest method setUp.
@Before
public void setUp() throws Exception {
bucket = mock(Bucket.class);
when(bucket.getName()).thenReturn("bucket");
publisher = mock(Publisher.class);
state = mock(PipelineState.class);
setResolver = mock(SetResolver.class);
victim = new StagedOutputPublisher(setResolver, bucket, publisher, OBJECT_MAPPER, Optional.of(new Run().ini(Ini.SOMATIC_INI.getValue()).id(1L)), Context.DIAGNOSTIC, true, false);
}
Aggregations