not sure where to ask this, but I've got a map wit...
# announcements
s
not sure where to ask this, but I've got a map with different objects in them, I'm trying to test each one of these objects on an overloaded method
Copy code
val events = mapOf(
    "Applicant Created" to applicantCreatedEvent(),
    "Property Registered" to propertyRegisteredEvent(),
    "Subject Property Details Registered" to subjectPropertyDetailsRegisteredEvent(),
    "Applicant Authorized a Credit Pull" to applicantAuthorizedCreditPullEvent(),
)
for ((eventText, eventObject) in events) {
    on("$eventObject should add '$eventText' to repository") {
        projector.handle(eventObject)
    }
}
This won't compile because
projector.handle()
takes many different types. Is there any way to provide kotlin with the information necessary so that it knows it can call the
handle
method with the objects that are in the map?