diff --git a/test/fr/devinsy/util/StringListTest.java b/test/fr/devinsy/util/StringListTest.java index 254a16b..368afac 100644 --- a/test/fr/devinsy/util/StringListTest.java +++ b/test/fr/devinsy/util/StringListTest.java @@ -232,4 +232,72 @@ public class StringListTest logger.debug("===== test done."); } + /** + * + */ + @Test + public void testToString01() + { + // + logger.debug("===== test starting..."); + + // + StringList buffer = new StringList(); + + String target = buffer.toString(); + + Assert.assertTrue(target.equals("")); + + // + logger.debug("===== test done."); + } + + /** + * + */ + @Test + public void testToString02() + { + // + logger.debug("===== test starting..."); + + // + String source = "abcdefghijklm"; + + StringList buffer = new StringList(); + buffer.append(source); + + String target = buffer.toString(); + + Assert.assertEquals(source, target); + Assert.assertTrue(target.equals(source)); + + // + logger.debug("===== test done."); + } + + /** + * + */ + @Test + public void testToString03() + { + // + logger.debug("===== test starting..."); + + // + String source1 = "abcdefghijklm"; + String source2 = "other stuff"; + + StringList buffer = new StringList(); + buffer.append(source1); + buffer.append(source2); + + String target = buffer.toString(); + + Assert.assertTrue(target.equals(source1 + source2)); + + // + logger.debug("===== test done."); + } }