-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOneWayTest.java
More file actions
30 lines (22 loc) · 762 Bytes
/
Copy pathOneWayTest.java
File metadata and controls
30 lines (22 loc) · 762 Bytes
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
package algorithm.cracking.arrays;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class OneWayTest {
private OneWay oneWay = new OneWay();
@Test
void oneWayTest() {
assertEquals(true, oneWay.checkOneWay("pale", "ple"));
assertEquals(true, oneWay.checkOneWay("pales", "pale"));
assertEquals(true, oneWay.checkOneWay("pale", "bale"));
assertEquals(false, oneWay.checkOneWay("pale", "bae"));
assertEquals(true, oneWay.checkOneWay("Edwin", "edwin"));
}
@Test
void oneWayNullTest() {
assertEquals(false, oneWay.checkOneWay(null, "ple"));
}
@Test
void oneWayTwoEmptyTest() {
assertEquals(true, oneWay.checkOneWay("", ""));
}
}