/** test that we get out the same number of reads we put in */ @Test public void testReadCount() { trav.traverse(walker, null, writer); assertEquals(writer.getRecords().size(), readTotal); }
@Test public void testBasicCount() { for (int x = 1; x <= 100; x++) { SAMRecord rec = ArtificialSAMUtils.createArtificialRead(header, String.valueOf(x), 1, x, ArtificialSAMUtils.DEFAULT_READ_LENGTH); writer.addAlignment(rec); } assertEquals(writer.getRecords().size(), 100); }
@Test public void testReadName() { List<String> names = new ArrayList<String>(); for (int x = 1; x <= 100; x++) { names.add(String.valueOf(x)); SAMRecord rec = ArtificialSAMUtils.createArtificialRead(header, String.valueOf(x), 1, x, ArtificialSAMUtils.DEFAULT_READ_LENGTH); writer.addAlignment(rec); } assertEquals(writer.getRecords().size(), 100); // check the names for (int x = 0; x < 100; x++) { assertTrue(names.get(x).equals(writer.getRecords().get(x).getReadName())); } }