/** Test of prepWordForSave method, of class PdfWord. */ @Test public void testPrepWordForSave() { assertEquals(instance.prepWordForSave(""), ""); assertEquals(instance.prepWordForSave("az"), "az"); assertEquals(instance.prepWordForSave("AZ"), "AZ"); assertEquals(instance.prepWordForSave("09"), "09"); assertEquals(instance.prepWordForSave("a'b"), "a'b"); assertEquals(instance.prepWordForSave("a'"), "a"); assertNotEquals(instance.prepWordForSave(Character.toString((char) 127)), ""); }
@Test public void testVerifyQualitySangerOutOfRange() { frag.setSequence(new Text("AGTAGTAGTAGTAGTAGTAGTAGTAGTAGT")); frag.setQuality( new Text("#############################" + Character.toString((char) 127))); // over range assertEquals( 29, SequencedFragment.verifyQuality( frag.getQuality(), FormatConstants.BaseQualityEncoding.Sanger)); frag.setQuality(new Text("##### ########################")); // under range assertEquals( 5, SequencedFragment.verifyQuality( frag.getQuality(), FormatConstants.BaseQualityEncoding.Sanger)); }