예제 #1
0
 @Test
 public void testStrTwoWhiteOnly() {
   assertFalse(AnagramUtil.isAnagram("aaabc", " \t\t  "));
 }
예제 #2
0
 @Test
 public void testStrTwoEmpty() {
   assertFalse(AnagramUtil.isAnagram("aaabc", ""));
 }
예제 #3
0
 @Test
 public void testStrOneWhiteOnly() {
   assertFalse(AnagramUtil.isAnagram("  \t", " abac"));
 }
예제 #4
0
 @Test
 public void testStrTwoNull() {
   assertFalse(AnagramUtil.isAnagram("aaabc", null));
 }
예제 #5
0
 @Test
 public void testStrOneEmpty() {
   assertFalse(AnagramUtil.isAnagram("", "acabad"));
 }
예제 #6
0
 @Test
 public void testStrTwoHasExtra() {
   assertFalse(AnagramUtil.isAnagram("aaabc", "acabad"));
 }
예제 #7
0
 @Test
 public void testStrOneNull() {
   assertFalse(AnagramUtil.isAnagram(null, "acabad"));
 }
예제 #8
0
 @Test
 public void testStrOneHasExtra() {
   assertFalse(AnagramUtil.isAnagram("aaabc", "aaba"));
 }
예제 #9
0
 @Test
 public void testDuplicateChars() {
   assertTrue(AnagramUtil.isAnagram("aaab", "aaba"));
 }
예제 #10
0
 @Test
 public void testComplex() {
   assertTrue(AnagramUtil.isAnagram("Tom Marvolo Riddle", "I am Lord Voldemort"));
 }
예제 #11
0
 @Test
 public void testCaseInsensitive() {
   assertTrue(AnagramUtil.isAnagram("Mary", "Army"));
 }
예제 #12
0
 @Test
 public void testWhiteSpaceIgnore() {
   assertTrue(AnagramUtil.isAnagram("a  b", "\tba"));
   assertTrue(AnagramUtil.isAnagram("  ba", "ab  "));
   assertTrue(AnagramUtil.isAnagram("     c b a ", " a\t c b  "));
 }