I have written a Scala testcase and run it through:
sbt > test
It fails, which is fine. I have issue with the output of the diff though as it is basically just:
[String] did not match [String]
leaving it up to me to find the difference. Esp. when comparing two Seq
it becomes hard to read and find the problem, e.g.:
[info] List(CruisePrice(aid,de,Wed Feb 15 00:00:00 CET 2017,Wed Mar 01 00:00:00 CET 2017,sailId,2000,3000,true,2,0,0,0,1000,2500.0,3000.0,SOME_RATE_CODE,SOME_RATE_DESCRIPTION,EUR,Sun Jan 01 00:00:00 CET 2017), CruisePrice(aid,de,Wed Feb 15 00:00:00 CET 2017,Wed Mar 01 00:00:00 CET 2017,sailId,9001,3000,true,2,0,0,0,9000,2500.0,3000.0,SOME_RATE_CODE,SOME_RATE_DESCRIPTION,EUR,Sun Jan 01 00:00:00 CET 2017)) did not equal List(CruisePrice(aid,de,Wed Feb 15 00:00:00 CET 2017,Wed Mar 01 00:00:00 CET 2017,sailId,9001,3000,true,2,0,0,0,9000,2500.0,3000.0,SOME_RATE_CODE,SOME_RATE_DESCRIPTION,EUR,Sun Jan 01 00:00:00 CET 2017)) (OverrideTest.scala:104)
Is there a way to configure for scala test to become more human readable so that they provide a more word-diff-like experience without having to parse huge chunk of text?
Or can I use a different way to assert it? As right now, I am using FlatSpec
with:
assert(seq1 == seq2)