Skip to content

Commit

Permalink
improves location class tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoberger committed Sep 14, 2019
1 parent 8e0d0cb commit dc76b34
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ class LocationDataClass : StringSpec({
shouldThrow<IllegalArgumentException> { Location(.0) }
shouldThrow<IllegalArgumentException> { Location(longitude = .0) }
}
"Providing all parameters should result on an exception" {
"Providing wrong combinations of parameters should result on an exception" {
shouldThrow<IllegalArgumentException> { Location(90.0, .0, "London") }
shouldThrow<IllegalArgumentException> { Location(longitude = .0, address = "London") }
shouldThrow<IllegalArgumentException> { Location(.0, address = "London") }
}
"Out of range coordinates should result in an exception" {
shouldThrow<IllegalArgumentException> { Location(91.0, .0) }
Expand Down

0 comments on commit dc76b34

Please sign in to comment.