snowe
04/27/2017, 7:40 PMval 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?