Package it.tidalwave.util
Class MockAs
- java.lang.Object
-
- it.tidalwave.util.MockAs
-
public final class MockAs extends java.lang.Object
A provider of static factory methods for creating mocks withAs
support.- Author:
- Fabrizio Giudici
-
-
Constructor Summary
Constructors Constructor Description MockAs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends As>
TmockWithAsSupport(java.lang.Class<T> clazz)
Creates a mock with Mockito that fully supportsAs
.static <T extends As>
TmockWithAsSupport(java.lang.Class<T> clazz, java.util.Collection<java.lang.Object> roles)
Creates a mock with Mockito that fully supportsAs
.
-
-
-
Method Detail
-
mockWithAsSupport
@Nonnull public static <T extends As> T mockWithAsSupport(@Nonnull java.lang.Class<T> clazz)
Creates a mock with Mockito that fully supportsAs
.- Parameters:
clazz
- the mock class- Returns:
- the mock
- Since:
- 3.2-ALPHA-3 (refactored)
-
mockWithAsSupport
@Nonnull public static <T extends As> T mockWithAsSupport(@Nonnull java.lang.Class<T> clazz, @Nonnull java.util.Collection<java.lang.Object> roles)
Creates a mock with Mockito that fully supportsAs
.- Parameters:
clazz
- the mock classroles
- a collection of roles or factories for roles- Returns:
- the mock
- Since:
- 3.2-ALPHA-3 (refactored)
-
-