-
Notifications
You must be signed in to change notification settings - Fork 866
Expand file tree
/
Copy pathFirstLettersTest.java
More file actions
37 lines (30 loc) · 942 Bytes
/
Copy pathFirstLettersTest.java
File metadata and controls
37 lines (30 loc) · 942 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
31
32
33
34
35
36
37
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Tests for {@link FirstLetters}. Do NOT modify this file — make these pass by
* completing FirstLetters.firstLetters.
*/
class FirstLettersTest {
@Test
void acronymFromSevenWords() {
assertEquals("ILOVEUT",
FirstLetters.firstLetters("Idol Long Oolong Vertical Europe University Toyota"));
}
@Test
void singleLetterWords() {
assertEquals("ABCDEFG", FirstLetters.firstLetters("A B C D E F G"));
}
@Test
void anotherSentence() {
assertEquals("TFLANTI",
FirstLetters.firstLetters("The First Letters Are Not That Interesting"));
}
@Test
void oneWord() {
assertEquals("H", FirstLetters.firstLetters("Hello"));
}
@Test
void twoWords() {
assertEquals("GM", FirstLetters.firstLetters("Good Morning"));
}
}