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"
MiSikora
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 PMsam
10/14/2020, 8:11 PMwithClue("greek ruler") {
Pantheon.Greek.ruler() shouldBe "Zeus"
}
greek ruler
Expected :"Odin"
Actual :"Zeus"
christophsturm
10/15/2020, 9:58 AMsam
10/15/2020, 10:35 AM