Open ppamorim opened 4 years ago
First thing: I know it's incorrect to mock lists.
I am experiencing issues to iterate in an object RealmList<Foo> using this mock library. You can see more of this problem here: https://stackoverflow.com/questions/63042724/how-to-mock-kotlins-list-foreach
RealmList<Foo>
I have been trying to call the native function but I am not sure what signature should be, I tried this below but no success:
doCallRealMethod().`when`(mockedList).forEach(any())
The code above is based on this one, especially in this line: https://github.com/realm/realm-java/blob/master/examples/unitTestExample/src/test/java/io/realm/examples/unittesting/ExampleActivityTest.java#L167
There are some conflicts in this implementation, especially with high order functions. Is there anything I can do sort this?
First thing: I know it's incorrect to mock lists.
I am experiencing issues to iterate in an object
RealmList<Foo>
using this mock library. You can see more of this problem here: https://stackoverflow.com/questions/63042724/how-to-mock-kotlins-list-foreachI have been trying to call the native function but I am not sure what signature should be, I tried this below but no success:
The code above is based on this one, especially in this line: https://github.com/realm/realm-java/blob/master/examples/unitTestExample/src/test/java/io/realm/examples/unittesting/ExampleActivityTest.java#L167
There are some conflicts in this implementation, especially with high order functions. Is there anything I can do sort this?