/**
* Test method for
* {@link net.sf.jfasta.impl.FASTAFileWriter#write(net.sf.jfasta.FASTAElement)}
* .
*
* @throws IOException
*/
@Test
public final void testExample03() throws IOException {
// Write a FASTA file element by element
FASTAElement e1 = new FASTAElementImpl("header", "seq");
FASTAElement e2 = new FASTAElementImpl("header2", "seq2");
FASTAElement e3 = new FASTAElementImpl("head", "atgc");
List<FASTAElement> elements = Arrays.asList(e1, e2, e3);
FASTAFileWriter writer = new FASTAFileWriter(out);
for (FASTAElement e : elements) {
writer.write(e);
}
writer.close();
assertEquals(new FASTAFileImpl(elements).toString()
+ UtilIO.NEW_LINE_STRING, out.toString());
}