-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathResultTest.java
More file actions
26 lines (20 loc) · 760 Bytes
/
ResultTest.java
File metadata and controls
26 lines (20 loc) · 760 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
package hackrank.algorithm.implement.time;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.jupiter.api.Test;
class ResultTest {
@Test
void timeInWords_HackerRankSampleInput0_SampleOutput0() {
String timeInWords = Result.timeInWords(5, 47);
assertThat(timeInWords).isEqualTo("thirteen minutes to six");
}
@Test
void timeInWords_HackerRankSampleInput1_SampleOutput1() {
String timeInWords = Result.timeInWords(3, 0);
assertThat(timeInWords).isEqualTo("three o' clock");
}
@Test
void timeInWords_HackerRankSampleInput2_SampleOutput2() {
String timeInWords = Result.timeInWords(7, 15);
assertThat(timeInWords).isEqualTo("quarter past seven");
}
}