mattmoore
04/29/2020, 1:30 AM4.0.4
with Arrow's Either
type to compare two lefts:
val expected = Left(
<http://java.io|java.io>.FileNotFoundException(
"data/monkeywrench.txt (No such file or directory)"
)
)
val result = loadShortCircuit(filePaths) // returns Arrow Left type in this example (see video)
val left = Left(<http://java.io|java.io>.FileNotFoundException("data/monkeywrench.txt (No such file or directory)"))
expected shouldBe left
expected shouldBe left
fails in this case. The equality fails.Mike
04/29/2020, 11:53 AMresult.shouldBeLeft { exception ->
exception shouldBe expectedException
}