mockspresso-api / com.episode6.hackit.mockspresso / Mockspresso / create

create

@NotNull abstract fun <T : Any!> create(@NotNull clazz: Class<T>): T

Create a real object injected with mockspresso dependencies.

Parameters

clazz - Class<T>: The class you want to create an instance of.

- Class type

Return
T: An instance of T

@NotNull abstract fun <T : Any!> create(@NotNull typeToken: TypeToken<T>): T

Create a real object injected with mockspresso dependencies.

Parameters

typeToken - TypeToken<T>: The class you want to create an instance of.

- Class type

Return
T: An instance of T