From c8ac3a7479354b2babf4b267913a8d1532687da9 Mon Sep 17 00:00:00 2001 From: Roc Boronat Date: Thu, 16 Jul 2015 01:38:15 +0200 Subject: [PATCH] Adding two safety StringUtils tests --- src/test/StringUtilsTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/StringUtilsTest.java b/src/test/StringUtilsTest.java index 0dba0cc..8380b8e 100644 --- a/src/test/StringUtilsTest.java +++ b/src/test/StringUtilsTest.java @@ -18,6 +18,16 @@ public void init() { su = new StringUtils(); } + @Test + public void shouldReturnEmpty1() { + assertEquals("", su.replaceLast("", "", "")); + } + + @Test + public void shouldReturnEmpty2() { + assertEquals("", su.replaceLast("", "ll", "xx")); + } + @Test public void shouldReturnHeo() { assertEquals("heo", su.replaceLast("hello", "ll", ""));