Search in sources :

Example 1 with MetadataLevel

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

the class DynamicMetadataOptionsTest method testMetadataLevel.

// -- MetadataOptions tests --
@Test
public void testMetadataLevel() {
    assertEquals(opt.getMetadataLevel(), DynamicMetadataOptions.METADATA_LEVEL_DEFAULT);
    for (MetadataLevel level : MetadataLevel.values()) {
        opt.setMetadataLevel(level);
        assertEquals(opt.getMetadataLevel(), level);
        assertEquals((new DynamicMetadataOptions(level)).getMetadataLevel(), level);
    }
}
Also used : DynamicMetadataOptions(loci.formats.in.DynamicMetadataOptions) MetadataLevel(loci.formats.in.MetadataLevel) Test(org.testng.annotations.Test)

Example 2 with MetadataLevel

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

the class ImageReaderTest method testOptionsImplicit.

@Test(dataProvider = "levels")
public void testOptionsImplicit(MetadataLevel level) throws Exception {
    ImageReader reader = new ImageReader();
    reader.getMetadataOptions().setMetadataLevel(level);
    reader.setId("test.fake");
    MetadataLevel rLevel = reader.getReader().getMetadataOptions().getMetadataLevel();
    assertEquals(rLevel, level);
    reader.close();
}
Also used : ImageReader(loci.formats.ImageReader) MetadataLevel(loci.formats.in.MetadataLevel) Test(org.testng.annotations.Test)

Example 3 with MetadataLevel

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

the class DefaultMetadataOptionsTest method testMetadataLevel.

@Test
public void testMetadataLevel() {
    assertEquals(opt.getMetadataLevel(), MetadataLevel.ALL);
    for (MetadataLevel level : MetadataLevel.values()) {
        opt.setMetadataLevel(level);
        assertEquals(opt.getMetadataLevel(), level);
        assertEquals((new DefaultMetadataOptions(level)).getMetadataLevel(), level);
    }
}
Also used : MetadataLevel(loci.formats.in.MetadataLevel) DefaultMetadataOptions(loci.formats.in.DefaultMetadataOptions) Test(org.testng.annotations.Test)

Aggregations

MetadataLevel (loci.formats.in.MetadataLevel)3 Test (org.testng.annotations.Test)3 ImageReader (loci.formats.ImageReader)1 DefaultMetadataOptions (loci.formats.in.DefaultMetadataOptions)1 DynamicMetadataOptions (loci.formats.in.DynamicMetadataOptions)1