doc / ch.tutteli.atrium.core.polyfills / useSingleService

useSingleService

fun <T : Any> useSingleService(kClass: KClass<T>, itr: Iterator<T>): T (source)

Returns the single service contained in itr and throws if there is any ore more than one.

Exceptions

NoSuchElementException - in case there is no service found for kClass.

IllegalStateException - in case there is more than one service found for kClass.