I had some problems with Dagger2 Provider. In my t...
# announcements
a
I had some problems with Dagger2 Provider. In my test kotlin I want to construct an object with Provider<DateTime!>! type (it is defined as java code). I create a val today = dateTimeFormatter.parseDateTime("17-09-22") and I try to put an argument like { today } to the constructor. I get Type mismatch. Required: Provider<DateTime!>! Found: () -> DateTime! What is more strange I have exactly the same code in other test with similar object and it is working. What could be the problem?
g
Try
Provider { today  }
instead of
{ today }
a
thanks! 🙂