Join Slack
Powered by
I think I get it
# atrium
d
dio
01/15/2018, 5:16 PM
I think I get it
r
robstoll
01/15/2018, 7:37 PM
I had a look at Arrow and see that Left and Right are both subclasses of Either. In this case you could use:
Copy code
assert(either).isA<Left>{ property(a).toBe(1) }
That's surely still too verbose but maybe already a start
robstoll
01/15/2018, 10:35 PM
Even better news, I published 0.6.0 and generalized DownCaster to TypeTransformer. Have a look at
https://github.com/robstoll/atrium/blob/master/atrium-assertions/src/test/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/TypeTransformerSpec.kt#L44
You could do something similar (or copy it). Also have a look 22 where you can see its usage
robstoll
01/15/2018, 10:46 PM
ah... wrong line numbers 41 and 19
2
Views
Open in Slack
Previous
Next