Search in sources :

Example 1 with RunApi

use of com.hartwig.api.RunApi 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()));
}
Also used : Bucket(com.google.cloud.storage.Bucket) SampleApi(com.hartwig.api.SampleApi) Run(com.hartwig.api.model.Run) UpdateRun(com.hartwig.api.model.UpdateRun) Publisher(com.google.cloud.pubsub.v1.Publisher) StagedOutputPublisher(com.hartwig.pipeline.transfer.staged.StagedOutputPublisher) SetResolver(com.hartwig.pipeline.transfer.staged.SetResolver) RunApi(com.hartwig.api.RunApi) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) StagedOutputPublisher(com.hartwig.pipeline.transfer.staged.StagedOutputPublisher) SetApi(com.hartwig.api.SetApi) Before(org.junit.Before)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 Publisher (com.google.cloud.pubsub.v1.Publisher)1 Bucket (com.google.cloud.storage.Bucket)1 RunApi (com.hartwig.api.RunApi)1 SampleApi (com.hartwig.api.SampleApi)1 SetApi (com.hartwig.api.SetApi)1 Run (com.hartwig.api.model.Run)1 UpdateRun (com.hartwig.api.model.UpdateRun)1 SetResolver (com.hartwig.pipeline.transfer.staged.SetResolver)1 StagedOutputPublisher (com.hartwig.pipeline.transfer.staged.StagedOutputPublisher)1 Before (org.junit.Before)1