-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIsPalindromicTest.java
More file actions
40 lines (29 loc) · 1.14 KB
/
IsPalindromicTest.java
File metadata and controls
40 lines (29 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.zipcodewilmington;
import org.junit.Assert;
import org.junit.Test;
public class IsPalindromicTest {
@Test
public void testIsPalindromic1() {
String[] array = {"a", "b", "c", "b", "a"};
boolean outcome = StringArrayUtils.isPalindromic(array);
Assert.assertTrue(outcome);
}
@Test
public void testIsPalindromic2() {
String[] array = {"Is this a palindrome?", "This is a palindrome", "Is this a palindrome?"};
boolean outcome = StringArrayUtils.isPalindromic(array);
Assert.assertTrue(outcome);
}
@Test
public void testIsPalindromic3() {
String[] array = {"Is this a plaindrome?", "This is not a plaindrome", "Is this a palindrome?", "This is not a palindrome"};
boolean outcome = StringArrayUtils.isPalindromic(array);
Assert.assertFalse(outcome);
}
@Test
public void testIsPalindromic4() {
String[] array = {"Is this a plaindrome?", "This is not a plaindrome", "This is not a plaindrome", "Is this a plaindrome?"};
boolean outcome = StringArrayUtils.isPalindromic(array);
Assert.assertTrue(outcome);
}
}