-
-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
Milestone
Description
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
◆ to be an instance of type: List (kotlin.collections.List) -- Class: java.util.List
» to be: empty
And we would like to see the following instead
expect: null
◆ not to equal: null but to be an instance of: List (kotlin.collections.List) -- Class: (java.util.List)
» to be: 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=> we would need to break the API in order that this works. Won't do it nownotToEqual
treatnull
specially so thatexpect(null as List<Int>?).notToBe(null)
also results in the reporting above (withoutto be: empty
of course)
Please react with 👍 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.