use of net.pms.formats.DVRMS in project UniversalMediaServer by UniversalMediaServer.
the class FormatRecognitionTest method testPS3Compatibility.
/**
* Test the compatibility of the
* {@link Format#isCompatible(DLNAMediaInfo, RendererConfiguration)} for the
* Playstation 3 renderer.
*/
@Test
public void testPS3Compatibility() {
// This test is only useful if the MediaInfo library is available
assumeTrue(mediaInfoParserIsValid);
RendererConfiguration conf = RendererConfiguration.getRendererConfigurationByName("Playstation 3");
assertNotNull("Renderer named \"Playstation 3\" found.", conf);
// DVRMS: false
DLNAMediaInfo info = new DLNAMediaInfo();
info.setContainer("dvr");
Format format = new DVRMS();
format.match("test.dvr");
assertFalse("isCompatible() gives the outcome false for DVRMS", conf.isCompatible(info, format, configuration));
// ISO: false
info = new DLNAMediaInfo();
info.setContainer("iso");
format = new ISO();
format.match("test.iso");
assertFalse("isCompatible() gives the outcome false for ISO", conf.isCompatible(info, format, configuration));
// M4A: false
info = new DLNAMediaInfo();
info.setContainer("m4a");
format = new M4A();
format.match("test.m4a");
assertTrue("isCompatible() gives the outcome true for M4A", conf.isCompatible(info, format, configuration));
// MKV: false
info = new DLNAMediaInfo();
info.setContainer("mkv");
format = new MKV();
format.match("test.mkv");
assertFalse("isCompatible() gives the outcome false for MKV", conf.isCompatible(info, format, configuration));
// MP3: true
info = new DLNAMediaInfo();
info.setContainer("mp3");
format = new MP3();
format.match("test.mp3");
assertTrue("isCompatible() gives the outcome true for MP3", conf.isCompatible(info, format, configuration));
// MPG: true
info = new DLNAMediaInfo();
info.setContainer("avi");
format = new MPG();
format.match("test.mpg");
assertTrue("isCompatible() gives the outcome true for MPG", conf.isCompatible(info, format, configuration));
// OGG: false
info = new DLNAMediaInfo();
info.setContainer("ogg");
format = new OGA();
format.match("test.ogg");
assertFalse("isCompatible() gives the outcome false for OGG", conf.isCompatible(info, format, configuration));
// RAW: false
info = new DLNAMediaInfo();
info.setContainer("raw");
format = new RAW();
format.match("test.arw");
assertFalse("isCompatible() gives the outcome false for RAW", conf.isCompatible(info, format, configuration));
// WAV: true
info = new DLNAMediaInfo();
info.setContainer("wav");
format = new WAV();
format.match("test.wav");
assertTrue("isCompatible() gives the outcome true for WAV", conf.isCompatible(info, format, configuration));
// WEB: type=VIDEO
info = new DLNAMediaInfo();
info.setContainer("avi");
format.setType(Format.VIDEO);
assertTrue("isCompatible() gives the outcome true for WEB video", conf.isCompatible(info, format, configuration));
}
Aggregations