use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService in project irida by phac-nml.
the class GalaxyHistoriesServiceIT method setup.
/**
* Sets up files for history tests.
* @throws URISyntaxException
* @throws IOException
* @throws CreateLibraryException
* @throws ExecutionManagerObjectNotFoundException
*/
@Before
public void setup() throws URISyntaxException, IOException, CreateLibraryException, ExecutionManagerObjectNotFoundException {
setupDataFiles();
galaxyInstanceAdmin = localGalaxy.getGalaxyInstanceAdmin();
HistoriesClient historiesClient = galaxyInstanceAdmin.getHistoriesClient();
ToolsClient toolsClient = galaxyInstanceAdmin.getToolsClient();
LibrariesClient librariesClient = galaxyInstanceAdmin.getLibrariesClient();
galaxyLibrariesService = new GalaxyLibrariesService(librariesClient, LIBRARY_POLLING_TIME, LIBRARY_TIMEOUT, 1);
galaxyHistory = new GalaxyHistoriesService(historiesClient, toolsClient, galaxyLibrariesService);
}
use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService in project irida by phac-nml.
the class GalaxyLibrariesServiceIT method setup.
/**
* Sets up variables for tests
* @throws URISyntaxException
*/
@Before
public void setup() throws URISyntaxException {
galaxyInstanceAdmin = localGalaxy.getGalaxyInstanceAdmin();
librariesClient = galaxyInstanceAdmin.getLibrariesClient();
galaxyLibrariesService = new GalaxyLibrariesService(librariesClient, LIBRARY_POLLING_TIME, LIBRARY_TIMEOUT, 1);
dataFile = Paths.get(GalaxyLibrariesServiceIT.class.getResource("testData1.fastq").toURI());
dataFile2 = Paths.get(GalaxyLibrariesServiceIT.class.getResource("testData2.fastq").toURI());
dataFileFail = Paths.get(GalaxyLibrariesServiceIT.class.getResource("fail.fastq.gz").toURI());
}
use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService in project irida by phac-nml.
the class GalaxyWorkflowsIT method setup.
/**
* Sets up files and objects for workflow tests.
* @throws URISyntaxException
* @throws IOException
*/
@Before
public void setup() throws URISyntaxException, IOException {
Assume.assumeFalse(WindowsPlatformCondition.isWindows());
dataFile1 = Paths.get(GalaxyWorkflowsIT.class.getResource("testData1.fastq").toURI());
dataFile2 = Paths.get(GalaxyWorkflowsIT.class.getResource("testData2.fastq").toURI());
dataFile3 = Paths.get(GalaxyWorkflowsIT.class.getResource("testData3.fastq").toURI());
dataFile4 = Paths.get(GalaxyWorkflowsIT.class.getResource("testData4.fastq").toURI());
workflowPath = Paths.get(GalaxyWorkflowsIT.class.getResource("GalaxyWorkflowSingleInput.ga").toURI());
invalidWorkflowPath = Paths.get(GalaxyWorkflowsIT.class.getResource("InvalidGalaxyWorkflowSingleInput.ga").toURI());
dataFileNotExists = Files.createTempFile("temp", ".temp");
Files.delete(dataFileNotExists);
assertFalse(Files.exists(dataFileNotExists));
galaxyAdminInstance = localGalaxy.getGalaxyInstanceAdmin();
toolsClient = galaxyAdminInstance.getToolsClient();
workflowsClient = galaxyAdminInstance.getWorkflowsClient();
historiesClient = galaxyAdminInstance.getHistoriesClient();
librariesClient = galaxyAdminInstance.getLibrariesClient();
GalaxyLibrariesService galaxyLibrariesService = new GalaxyLibrariesService(librariesClient, LIBRARY_POLLING_TIME, LIBRARY_TIMEOUT, 1);
galaxyHistory = new GalaxyHistoriesService(historiesClient, toolsClient, galaxyLibrariesService);
galaxyWorkflowService = new GalaxyWorkflowService(workflowsClient, StandardCharsets.UTF_8);
}
use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService in project irida by phac-nml.
the class GalaxyLibrariesServiceTest method testBuildEmptyLibrary.
/**
* Tests create empty library.
* @throws CreateLibraryException
*/
@Test
public void testBuildEmptyLibrary() throws CreateLibraryException {
when(librariesClient.createLibrary(any(Library.class))).thenReturn(testLibrary);
Library library = new GalaxyLibrariesService(librariesClient, 1, 2, 1).buildEmptyLibrary(new GalaxyProjectName("test"));
assertNotNull(library);
assertEquals("test", library.getName());
assertEquals(LIBRARY_ID, library.getId());
}
use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService in project irida by phac-nml.
the class GalaxyLibrariesServiceTest method testBuildEmptyLibraryFail.
/**
* Tests create empty library.
*
* @throws CreateLibraryException
*/
@Test(expected = CreateLibraryException.class)
public void testBuildEmptyLibraryFail() throws CreateLibraryException {
when(librariesClient.createLibrary(any(Library.class))).thenReturn(null);
new GalaxyLibrariesService(librariesClient, 1, 2, 1).buildEmptyLibrary(new GalaxyProjectName("test"));
}
Aggregations