@NotNull abstract fun <T : Any!> realObject(@NotNull objectClass: Class<T>): Mockspresso.Builder
Instruct mockspresso to create a real object for the provided dependency key. Convenience method, equivalent to calling realObject(DependencyKey.of(objectClass), objectClass);
objectClass
- Class<T>: The class of the dependency key we should create real objects for
Return
Mockspresso.Builder: this
@NotNull abstract fun <T : Any!> realObject(@NotNull objectToken: TypeToken<T>): Mockspresso.Builder
Instruct mockspresso to create a real object for the provided dependency key. Convenience method, equivalent to calling realObject(DependencyKey.of(objectToken), objectToken);
objectToken
- TypeToken<T>: The TypeToken of the dependency key we should create real objects for
Return
Mockspresso.Builder: this
@NotNull abstract fun <T : Any!> realObject(@NotNull keyAndImplementation: DependencyKey<T>): Mockspresso.Builder
Instruct mockspresso to create a real object for the provided dependency key. Convenience method, equivalent to calling realObject(keyAndImplementation, keyAndImplementation.typeToken);
keyAndImplementation
- DependencyKey<T>: The DependencyKey
representing the dependency we should create real objects to fulfil.
Return
Mockspresso.Builder: this
@NotNull abstract fun <T : Any!> realObject(@NotNull key: DependencyKey<T>, @NotNull implementationClass: Class<out T>): Mockspresso.Builder
Instruct mockspresso to create a real object (of type implementationClass) for the provided dependency key.
key
- DependencyKey<T>: The DependencyKey
representing the dependency we should create real objects to fulfil.
implementationClass
- Class<out T>: The type of object we mockspresso should create to fulfil dependencies matching key.
Return
Mockspresso.Builder: this
@NotNull abstract fun <T : Any!> realObject(@NotNull key: DependencyKey<T>, @NotNull implementationToken: TypeToken<out T>): Mockspresso.Builder
Instruct mockspresso to create a real object (of type implementationClass) for the provided dependency key.
key
- DependencyKey<T>: The DependencyKey
representing the dependency we should create real objects to fulfil.
implementationToken
- TypeToken<out T>: The type of object we mockspresso should create to fulfil dependencies matching key.
Return
Mockspresso.Builder: this