forked from exercism/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAtbashTest.java
More file actions
101 lines (83 loc) · 2.62 KB
/
AtbashTest.java
File metadata and controls
101 lines (83 loc) · 2.62 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class AtbashTest {
private Atbash atbash;
@Before
public void setup() {
atbash = new Atbash();
}
@Test
public void testEncodeYes() {
assertEquals("bvh", atbash.encode("yes"));
}
@Ignore("Remove to run test")
@Test
public void testEncodeNo() {
assertEquals("ml", atbash.encode("no"));
}
@Ignore("Remove to run test")
@Test
public void testEncodeOmgInCapital() {
assertEquals("lnt", atbash.encode("OMG"));
}
@Ignore("Remove to run test")
@Test
public void testEncodeOmgWithSpaces() {
assertEquals("lnt", atbash.encode("O M G"));
}
@Ignore("Remove to run test")
@Test
public void testEncodeMindBlowingly() {
assertEquals("nrmwy oldrm tob", atbash.encode("mindblowingly"));
}
@Ignore("Remove to run test")
@Test
public void testEncodeNumbers() {
assertEquals("gvhgr mt123 gvhgr mt", atbash.encode("Testing,1 2 3, testing."));
}
@Ignore("Remove to run test")
@Test
public void testEncodeDeepThought() {
assertEquals("gifgs rhurx grlm", atbash.encode("Truth is fiction."));
}
@Ignore("Remove to run test")
@Test
public void testEncodeAllTheLetters() {
assertEquals("gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt",
atbash.encode("The quick brown fox jumps over the lazy dog."));
}
@Ignore("Remove to run test")
@Test
public void testDecodeExercism() {
assertEquals("exercism", atbash.decode("vcvix rhn"));
}
@Ignore("Remove to run test")
@Test
public void testDecodeASentence() {
assertEquals("anobstacleisoftenasteppingstone", atbash.decode("zmlyh gzxov rhlug vmzhg vkkrm thglm v"));
}
@Ignore("Remove to run test")
@Test
public void testDecodeNumbers() {
assertEquals("testing123testing", atbash.decode("gvhgr mt123 gvhgr mt"));
}
@Ignore("Remove to run test")
@Test
public void testDecodeAllTheLetters() {
assertEquals("thequickbrownfoxjumpsoverthelazydog",
atbash.decode("gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"));
}
@Ignore("Remove to run test")
@Test
public void testDecodeWithTooManySpaces() {
assertEquals("exercism", atbash.decode("vc vix r hn"));
}
@Ignore("Remove to run test")
@Test
public void testDecodeWithNoSpaces() {
assertEquals("anobstacleisoftenasteppingstone",
atbash.decode("zmlyhgzxovrhlugvmzhgvkkrmthglmv"));
}
}