File tree 3 files changed +11
-3
lines changed
main/kotlin/nl/fifthpostulate
test/kotlin/nl/fifthpostulate/standard
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change
1
+ package nl.fifthpostulate
2
+
3
+ interface FizzBuzz {
4
+ fun of (n : Int ): String
5
+ }
Original file line number Diff line number Diff line change 1
1
package nl.fifthpostulate.standard
2
2
3
- class FizzBuzz {
4
- fun of (n : Int ): String {
3
+ import nl.fifthpostulate.FizzBuzz
4
+
5
+ class Standard : FizzBuzz {
6
+ override fun of (n : Int ): String {
5
7
if (n % 15 == 0 ) {
6
8
return " FizzBuzz"
7
9
}
Original file line number Diff line number Diff line change 1
1
package nl.fifthpostulate.standard
2
2
3
+ import nl.fifthpostulate.FizzBuzz
3
4
import org.junit.jupiter.api.BeforeEach
4
5
import kotlin.test.Test
5
6
import kotlin.test.assertEquals
@@ -9,7 +10,7 @@ class StandardTest {
9
10
10
11
@BeforeEach
11
12
fun createFizzBuzz () {
12
- fizzbuzz = FizzBuzz ()
13
+ fizzbuzz = Standard ()
13
14
}
14
15
15
16
@Test
You can’t perform that action at this time.
0 commit comments