Search in sources :

Example 1 with ReferenceFileController

use of ca.corefacility.bioinformatics.irida.ria.web.files.ReferenceFileController in project irida by phac-nml.

the class ReferenceFileControllerTest method setUp.

@Before
public void setUp() {
    projectService = mock(ProjectService.class);
    referenceFileService = mock(ReferenceFileService.class);
    messageSource = mock(MessageSource.class);
    // Set up the reference file
    Path path = Paths.get(FILE_PATH);
    ReferenceFile file = new ReferenceFile(path);
    when(referenceFileService.read(FILE_ID)).thenReturn(file);
    controller = new ReferenceFileController(projectService, referenceFileService, messageSource);
}
Also used : Path(java.nio.file.Path) ReferenceFile(ca.corefacility.bioinformatics.irida.model.project.ReferenceFile) ReferenceFileController(ca.corefacility.bioinformatics.irida.ria.web.files.ReferenceFileController) ProjectService(ca.corefacility.bioinformatics.irida.service.ProjectService) MessageSource(org.springframework.context.MessageSource) ReferenceFileService(ca.corefacility.bioinformatics.irida.service.ReferenceFileService) Before(org.junit.Before)

Aggregations

ReferenceFile (ca.corefacility.bioinformatics.irida.model.project.ReferenceFile)1 ReferenceFileController (ca.corefacility.bioinformatics.irida.ria.web.files.ReferenceFileController)1 ProjectService (ca.corefacility.bioinformatics.irida.service.ProjectService)1 ReferenceFileService (ca.corefacility.bioinformatics.irida.service.ReferenceFileService)1 Path (java.nio.file.Path)1 Before (org.junit.Before)1 MessageSource (org.springframework.context.MessageSource)1