christophsturm
10/14/2020, 2:27 PMval subject = Pantheon.NORSE
expectThat(subject)
.get(Pantheon::ruler) // reference to a property
.get { toString() } // return type of a method call
.isEqualTo("Odin")sam
10/14/2020, 2:32 PMsubject.ruler shouldBe "Odin"sam
10/14/2020, 2:34 PMMiSikora
10/14/2020, 2:52 PMruler to a String or is toString() missing? Seems kind of spooky if it convertssam
10/14/2020, 3:19 PMsubject.ruler.toString() shouldBe "Odin"christophsturm
10/14/2020, 7:48 PMchristophsturm
10/14/2020, 7:49 PMchristophsturm
10/14/2020, 7:50 PMsam
10/14/2020, 8:11 PMsam
10/14/2020, 8:11 PMwithClue("greek ruler") {
Pantheon.Greek.ruler() shouldBe "Zeus"
}sam
10/14/2020, 8:12 PMgreek ruler
Expected :"Odin"
Actual :"Zeus"sam
10/14/2020, 8:12 PMsam
10/14/2020, 8:13 PMchristophsturm
10/15/2020, 9:58 AMsam
10/15/2020, 10:35 AM