Steve Freeman
Steve Freeman
I'm confused. What is the actual value passed to the matcher? Is it a long, or a Long, or a String?
I'm confused again. Which code do you want to see? As to your original problem, if the actual value is a Long then that's what the expected value should be,...
@tusharjoshi Understood. Thanks
Ouch. Not sure what we can do about that. In meantime, I tend to use the JUnit `assertNotEquals()` for simple comparison.s
Interesting. So the use case is that you have a collection of mixed numbers, some of which are floating point and some not?
In that case, it makes more sense to me to have an ordinal version of close to. It feels odd to do floating point comparisons for int/long.
One small correction, you don't need to do the null value check. The matcher should handle that.
I've pushed HasPropertyWithValue.hasPropertyAtPath() based on your solution. See what you think.