@Test public void testInputRDF() { MutopiaPiece thisPiece = MutopiaRDF.inputRDF(INPUT_RDF_NAME); assertEquals(piece.getTitle(), thisPiece.getTitle()); assertEquals(piece.getComposer(), thisPiece.getComposer()); assertEquals(piece.getOpus(), thisPiece.getOpus()); assertEquals(piece.getInstrument(), thisPiece.getInstrument()); assertEquals(piece.getStyle(), thisPiece.getStyle()); }
@Ignore("fails if lilypond compiler version mismatch") @Test public void testOutputRDF() throws IOException { File file = new File(OUTPUT_RDF_NAME); file.createNewFile(); BufferedWriter wr = new BufferedWriter(new FileWriter(file)); try { MutopiaRDF.outputRDF(piece, wr); } catch (IOException e) { fail(e.toString()); } wr.close(); List<String> theseLines = loadFile(OUTPUT_RDF_NAME); List<String> testLines = loadFile(INPUT_RDF_NAME); Files.delete(file.toPath()); assertEquals(testLines, theseLines); }