Skip to content

Commit 10815c0

Browse files
committed
test: improve HemisphereTest
1 parent f9ef8ed commit 10815c0

File tree

1 file changed

+21
-4
lines changed
  • core/measurement/src/test/kotlin/io/trewartha/positional/core/measurement

1 file changed

+21
-4
lines changed

core/measurement/src/test/kotlin/io/trewartha/positional/core/measurement/HemisphereTest.kt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,26 @@ import kotlin.test.Test
66
class HemisphereTest {
77

88
@Test
9-
fun `Conversion to string returns first letter`() {
10-
for (hemisphere in Hemisphere.entries) {
11-
hemisphere.toString().shouldBe(hemisphere.name.first().uppercase())
12-
}
9+
fun `Given NORTH hemisphere, when converting to string, then returns N`() {
10+
// Given
11+
val hemisphere = Hemisphere.NORTH
12+
13+
// When
14+
val result = hemisphere.toString()
15+
16+
// Then
17+
result.shouldBe("N")
18+
}
19+
20+
@Test
21+
fun `Given SOUTH hemisphere, when converting to string, then returns S`() {
22+
// Given
23+
val hemisphere = Hemisphere.SOUTH
24+
25+
// When
26+
val result = hemisphere.toString()
27+
28+
// Then
29+
result.shouldBe("S")
1330
}
1431
}

0 commit comments

Comments
 (0)