Search in sources :

Example 1 with MusicXmlFileReader

use of com.xenoage.zong.io.musicxml.in.MusicXmlFileReader in project Zong by Xenoage.

the class Test90a method testOpenFile.

@Test
public void testOpenFile() {
    String filepath = Base.dirPath + getFileName();
    try {
        List<Score> scores = sync(new MusicXmlFileReader(io().openFile(filepath), filepath, l -> CollectionUtils.alist("20a-Compressed-MusicXML.xml")));
        assertEquals(1, scores.size());
        assertEquals("Compressed MusicXML file", scores.get(0).getInfo().getMovementTitle());
    } catch (Exception ex) {
        ex.printStackTrace();
        fail(ex.getMessage());
    }
}
Also used : MusicXmlFileReader(com.xenoage.zong.io.musicxml.in.MusicXmlFileReader) List(java.util.List) Base90a(musicxmltestsuite.tests.base.Base90a) Base(musicxmltestsuite.tests.base.Base) Assert.fail(org.junit.Assert.fail) Test(org.junit.Test) CollectionUtils(com.xenoage.utils.collections.CollectionUtils) JsePlatformUtils.io(com.xenoage.utils.jse.JsePlatformUtils.io) Sync.sync(com.xenoage.utils.jse.async.Sync.sync) Assert.assertEquals(org.junit.Assert.assertEquals) Score(com.xenoage.zong.core.Score) Score(com.xenoage.zong.core.Score) MusicXmlFileReader(com.xenoage.zong.io.musicxml.in.MusicXmlFileReader) Test(org.junit.Test)

Aggregations

CollectionUtils (com.xenoage.utils.collections.CollectionUtils)1 JsePlatformUtils.io (com.xenoage.utils.jse.JsePlatformUtils.io)1 Sync.sync (com.xenoage.utils.jse.async.Sync.sync)1 Score (com.xenoage.zong.core.Score)1 MusicXmlFileReader (com.xenoage.zong.io.musicxml.in.MusicXmlFileReader)1 List (java.util.List)1 Base (musicxmltestsuite.tests.base.Base)1 Base90a (musicxmltestsuite.tests.base.Base90a)1 Assert.assertEquals (org.junit.Assert.assertEquals)1 Assert.fail (org.junit.Assert.fail)1 Test (org.junit.Test)1