Created
April 15, 2018 10:53
-
-
Save rozkminiacz/d4c100aac66fe4f538232bf411b41113 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DistanceConverterSpecificiation : Spek({ | |
describe("distance converter") { | |
val distanceConverter: DistanceConverter by memoized { | |
DistanceConverter() | |
} | |
on("distance 61888.123m") { | |
val testDistance = 61888.123 | |
it("should return >50km") { | |
val convert = distanceConverter.convert(testDistance) | |
assertTrue(convert.contentEquals(">50km")) | |
} | |
} | |
on("distance 38777.23m") { | |
val testDistance = 38777.23 | |
it("should return 38.8km") { | |
val convert = distanceConverter.convert(testDistance) | |
assertTrue(convert.contentEquals("38.8km")) | |
} | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment