Commit c90b2bea authored by Shanelle Valencia's avatar Shanelle Valencia

Add more tests

parent 4deb3327
...@@ -11,7 +11,7 @@ import java.util.List; ...@@ -11,7 +11,7 @@ import java.util.List;
public class StringsTest { public class StringsTest {
String string; private String sentence = "This is a sentence with even and odd words";
@Before @Before
...@@ -48,7 +48,6 @@ public class StringsTest { ...@@ -48,7 +48,6 @@ public class StringsTest {
@Test @Test
public void testEvenWordsInSent() { public void testEvenWordsInSent() {
String sentence = "This is a sentence with even and odd words";
List<String> expected = new Strings().evenWordsInSent(sentence); List<String> expected = new Strings().evenWordsInSent(sentence);
List<String> actual = Arrays.asList(sentence.split(" ")); List<String> actual = Arrays.asList(sentence.split(" "));
// List<String> actual = Arrays.asList("This", "is", "sentence", "with", "even"); // List<String> actual = Arrays.asList("This", "is", "sentence", "with", "even");
...@@ -61,7 +60,6 @@ public class StringsTest { ...@@ -61,7 +60,6 @@ public class StringsTest {
@Test @Test
public void assertNotEquals() { public void assertNotEquals() {
String sentence = "This is a sentence with even and odd words";
List<String> expected = new Strings().evenWordsInSent(sentence); List<String> expected = new Strings().evenWordsInSent(sentence);
List<String> actual = Arrays.asList(sentence.split(" ")); List<String> actual = Arrays.asList(sentence.split(" "));
...@@ -71,7 +69,6 @@ public class StringsTest { ...@@ -71,7 +69,6 @@ public class StringsTest {
@Test @Test
public void assertNotSame() { public void assertNotSame() {
String sentence = "This is a sentence with even and odd words";
List<String> expected = new Strings().evenWordsInSent(sentence); List<String> expected = new Strings().evenWordsInSent(sentence);
List<String> actual = Arrays.asList(sentence.split(" ")); List<String> actual = Arrays.asList(sentence.split(" "));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment