Search in sources :

Example 1 with FakeReader

use of loci.formats.in.FakeReader in project bioformats by openmicroscopy.

the class FakeReaderTest method setUp.

@BeforeMethod
public void setUp() throws Exception {
    wd = Files.createTempDirectory(this.getClass().getName());
    reader = new FakeReader();
    ServiceFactory sf = new ServiceFactory();
    service = sf.getInstance(OMEXMLService.class);
    reader.setMetadataStore(service.createOMEXMLMetadata());
}
Also used : ServiceFactory(loci.common.services.ServiceFactory) FakeReader(loci.formats.in.FakeReader) OMEXMLService(loci.formats.services.OMEXMLService) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with FakeReader

use of loci.formats.in.FakeReader in project bioformats by openmicroscopy.

the class MemoizerTest method setUp.

@BeforeMethod
public void setUp() throws Exception {
    idDir = createTempDir();
    File tempFile = new File(idDir, TEST_FILE);
    tempFile.createNewFile();
    id = tempFile.getAbsolutePath();
    // No setId !
    reader = new FakeReader();
}
Also used : FakeReader(loci.formats.in.FakeReader) File(java.io.File) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with FakeReader

use of loci.formats.in.FakeReader in project bioformats by openmicroscopy.

the class FileStitcherTest method testUnderlyingReaders.

@Test
public void testUnderlyingReaders() throws IOException, FormatException {
    FakeReader reader = new FakeReader();
    FileStitcher fs = new FileStitcher(reader);
    assertNotNull(fs.getUnderlyingReaders());
    fs.setId("test_z<0-2>.fake");
    assertNotNull(fs.getUnderlyingReaders());
    fs.close();
}
Also used : FileStitcher(loci.formats.FileStitcher) FakeReader(loci.formats.in.FakeReader) Test(org.testng.annotations.Test)

Aggregations

FakeReader (loci.formats.in.FakeReader)3 BeforeMethod (org.testng.annotations.BeforeMethod)2 File (java.io.File)1 ServiceFactory (loci.common.services.ServiceFactory)1 FileStitcher (loci.formats.FileStitcher)1 OMEXMLService (loci.formats.services.OMEXMLService)1 Test (org.testng.annotations.Test)1