forked from exercism/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAcronymTest.java
More file actions
75 lines (61 loc) · 1.99 KB
/
Copy pathAcronymTest.java
File metadata and controls
75 lines (61 loc) · 1.99 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
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.DisplayName;
import static org.assertj.core.api.Assertions.assertThat;
public class AcronymTest {
@DisplayName("basic")
@Test
public void basic() {
assertThat(new Acronym("Portable Network Graphics").get())
.isEqualTo("PNG");
}
@DisplayName("lowercase words")
@Disabled("Remove to run test")
@Test
public void lowercaseWords() {
assertThat(new Acronym("Ruby on Rails").get())
.isEqualTo("ROR");
}
@Disabled("Remove to run test")
@Test
public void punctuation() {
assertThat(new Acronym("First In, First Out").get())
.isEqualTo("FIFO");
}
@Disabled("Remove to run test")
@Test
public void nonAcronymAllCapsWord() {
assertThat(new Acronym("GNU Image Manipulation Program").get())
.isEqualTo("GIMP");
}
@Disabled("Remove to run test")
@Test
public void punctuationWithoutWhitespace() {
assertThat(new Acronym("Complementary metal-oxide semiconductor").get())
.isEqualTo("CMOS");
}
@Disabled("Remove to run test")
@Test
public void veryLongAbbreviation() {
assertThat(new Acronym("Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me").get())
.isEqualTo("ROTFLSHTMDCOALM");
}
@Disabled("Remove to run test")
@Test
public void consecutiveDelimiters() {
assertThat(new Acronym("Something - I made up from thin air").get())
.isEqualTo("SIMUFTA");
}
@Disabled("Remove to run test")
@Test
public void apostrophes() {
assertThat(new Acronym("Halley's Comet").get())
.isEqualTo("HC");
}
@Disabled("Remove to run test")
@Test
public void underscoreEmphasis() {
assertThat(new Acronym("The Road _Not_ Taken").get())
.isEqualTo("TRNT");
}
}