Package com.google.api.services.genomics.model

Examples of com.google.api.services.genomics.model.Job


        new CallReadGroupSetsResponse().setJobId("8675309"));

    // Get the job
    Mockito.when(jobs.get("8675309")).thenReturn(jobGet);
    Mockito.when(jobGet.execute()).thenReturn(
        new Job().setDetailedStatus("description1").setImportedIds(Lists.newArrayList("r1")));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("called variants into: 1kg"));
View Full Code Here


    command.projectNumber = 9L;

    Mockito.when(jobs.search(new SearchJobsRequest().setProjectNumber(9L).setPageSize(10)))
        .thenReturn(jobSearch);
    Mockito.when(jobSearch.execute()).thenReturn(new SearchJobsResponse().setJobs(
        Lists.newArrayList(new Job().setId("previousJob"), new Job().setId("newjob"))));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("previousJob"));
View Full Code Here

    command.createdBefore = new Date(456L);

    Mockito.when(jobs.search(new SearchJobsRequest().setProjectNumber(9L)
        .setCreatedAfter(123L).setCreatedBefore(456L).setPageSize(10))).thenReturn(jobSearch);
    Mockito.when(jobSearch.execute()).thenReturn(new SearchJobsResponse().setJobs(
        Lists.newArrayList(new Job().setId("myJob"))));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("myJob"));
View Full Code Here

        new AlignReadGroupSetsResponse().setJobId("8675309"));

    // Get the job
    Mockito.when(jobs.get("8675309")).thenReturn(jobGet);
    Mockito.when(jobGet.execute()).thenReturn(
        new Job().setDetailedStatus("description1").setImportedIds(Lists.newArrayList("r1")));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("read group sets into: 1kg"));
View Full Code Here

        new AlignReadGroupSetsResponse().setJobId("8675309"));

    // Get the job
    Mockito.when(jobs.get("8675309")).thenReturn(jobGet);
    Mockito.when(jobGet.execute()).thenReturn(
        new Job().setDetailedStatus("description1").setImportedIds(Lists.newArrayList("r1")));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("read group sets into: 1kg"));
View Full Code Here

        new AlignReadGroupSetsResponse().setJobId("8675309"));

    // Get the job
    Mockito.when(jobs.get("8675309")).thenReturn(jobGet);
    Mockito.when(jobGet.execute()).thenReturn(
        new Job().setDetailedStatus("description1").setImportedIds(Lists.newArrayList("r1")));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("read group sets into: 1kg"));
View Full Code Here

    command.jobIds = Lists.newArrayList("j1", "j2");

    Mockito.when(jobs.get("j1")).thenReturn(jobGet);
    Mockito.when(jobs.get("j2")).thenReturn(jobGet);
    Mockito.when(jobGet.execute()).thenReturn(
        new Job().setDetailedStatus("description1"),
        new Job().setDetailedStatus("description2").setCreated(1405719531000L));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("description1"));
View Full Code Here

    command.pollForStatus = true;
    command.pollingDelay = 10;

    Mockito.when(jobs.get("j1")).thenReturn(jobGet);
    Mockito.when(jobGet.execute()).thenReturn(
        new Job().setStatus("started").setId("j1"),
        new Job().setStatus("started").setId("j1"))
        .thenThrow(GoogleJsonResponseException.class).thenReturn(
        new Job().setStatus("pending").setDetailedStatus("pending-description"),
        new Job().setStatus("pending").setDetailedStatus("pending-description"),
        new Job().setStatus("success").setDetailedStatus("description-done"));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("Waiting for job: j1"));
View Full Code Here

    Mockito.when(readsetExport.execute()).thenReturn(
        new ExportReadGroupSetsResponse().setJobId("8675309"));

    // Get the job
    Mockito.when(jobs.get("8675309")).thenReturn(jobGet);
    Mockito.when(jobGet.execute()).thenReturn(new Job().setDetailedStatus("description1"));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("Exporting read group sets name1,name2"));
View Full Code Here

    Mockito.when(jobs.cancel("j1")).thenReturn(jobCancel);

    Mockito.when(jobs.get("j1")).thenReturn(jobGet);
    Mockito.when(jobGet.execute()).thenReturn(
        new Job().setStatus("cancelled"));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("cancelled"));
View Full Code Here

TOP

Related Classes of com.google.api.services.genomics.model.Job

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.