File tree 1 file changed +35
-0
lines changed
src/test/java/com/thealgorithms/strings
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .thealgorithms .strings ;
2
+
3
+ import org .junit .jupiter .api .Test ;
4
+
5
+ import static org .junit .jupiter .api .Assertions .*;
6
+
7
+
8
+ public class CheckAnagramsTest {
9
+ @ Test
10
+ public void CheckAnagrams () {
11
+ String testString1 = "STUDY" ;
12
+ String testString2 = "DUSTY" ;
13
+ assertTrue (CheckAnagrams .isAnagrams (testString1 ,testString2 ));
14
+ }
15
+
16
+ @ Test
17
+ public void CheckFalseAnagrams () {
18
+ String testString1 = "STUDY" ;
19
+ String testString2 = "random" ;
20
+ assertFalse (CheckAnagrams .isAnagrams (testString1 ,testString2 ));
21
+ }
22
+
23
+ @ Test
24
+ public void CheckSameWordAnagrams () {
25
+ String testString1 = "STUDY" ;
26
+ assertTrue (CheckAnagrams .isAnagrams (testString1 ,testString1 ));
27
+ }
28
+
29
+ @ Test
30
+ public void CheckDifferentCasesAnagram () {
31
+ String testString1 = "STUDY" ;
32
+ String testString2 = "dusty" ;
33
+ assertTrue (CheckAnagrams .isAnagrams (testString1 ,testString2 ));
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments