LeoColman
07/24/2022, 3:22 PMreplace
instead of replaceFirst
or something like thatsam
07/24/2022, 5:01 PMMichael Strasser
07/26/2022, 10:38 PMLeoColman
07/27/2022, 12:11 PMMichael Strasser
07/27/2022, 12:19 PMLeoColman
07/27/2022, 12:46 PMclass RestaurantTest : FunSpec({
test("Should map ID to Name correctly") {
Restaurant.AllRestaurants shouldContainExactly mapOf(
1L to "Piracicaba",
2L to "Restaurante área 1",
3L to "Restaurante área 2",
4L to "Restaurante CRHEA",
5L to "Pirassununga",
6L to "Central",
7L to "PUSP-C",
8L to "Física",
9L to "Químicas",
11L to "Fac. Saúde Pública",
12L to "Escola de Enfermagem",
13L to "EACH",
14L to "Largo São Francisco",
17L to "EEL - Área I",
19L to "Restaurante Central",
20L to "Bauru",
23L to "EEL - Área II"
)
}
test("Should contain 17 mapped restaurants (known amount on 2022-07-23)") {
Restaurant.AllRestaurants shouldHaveSize 17
}
context("Find") {
test("Finds known restaurants") {
Restaurant.find(13) shouldBe Restaurant(13L, "EACH")
}
test("Returns null on unknown restaurants") {
Restaurant.find(214) shouldBe null
}
}
})
override val isolationMode = IsolationMode.InstancePerTest
sam
07/27/2022, 10:50 PMMichael Strasser
07/27/2022, 10:51 PM