atrium
atrium copied to clipboard
change report for notToEqualNull
Platform (jvm, js, android): Extension (none, kotlin 1.3, jdk8): none
Code related feature
expect(null as List<Int>?).notToEqualNull {
toBeEmpty()
}
For this we currently see in reporting
expect: null
◆ is instance of type: List (kotlin.collections.List) -- Class: java.util.List
» is: empty
And we would like to see the following instead
expect: null
◆ is not: null but is instance of: List (kotlin.collections.List) -- Class: (java.util.List)
» is: empty
This means notToEqualNull has to do more than just delegating to toBeAnInstanceOf hence:
- don't delegate simply to isA in
DefaultAnyAssertions.notToBeNullBut - copy implementation of isA but change the options, to be more precise, change the description and the representation
- change the implementation of
notToBetreatnullspecially so thatexpect(null as List<Int>?).notToBe(null)also results in the reporting above (withoutis: emptyof course)
Please react with :+1: if you would like to see this feature implemented in Atrium, the more upvotes the more likely I will implement it myself -- feel free to sponsor me, that would be a motivation too.
You are of course welcome to work on this issue. Write I'll work on it as comment so that we can assign the task to you.