public class RepositoryMockBuilder extends Object implements Start, ImplementationAnd, KeyGeneration
| Constructor and Description |
|---|
RepositoryMockBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ImplementationAnd |
and(Class<?> implementation)
Tells the builder to use this additional implementation
|
<S extends Serializable,G extends KeyGenerator<S>> |
generateKeysUsing(Class<G> generatorType)
Sets the key generator to an instance of the provided type.
|
<S extends Serializable> |
generateKeysUsing(KeyGenerator<S> keyGenerator)
Sets the key generator to the provided instance
|
<E> E |
mock(Class<E> repositoryInterface)
Tells the builder that it is now time to mock the given repository interface using the configuration provided
thus far.
|
KeyGeneration |
useConfiguration(RepositoryFactoryConfiguration configuration)
Tells the builder to use the given configuration
|
KeyGeneration |
useFactory(RepositoryFactory factory)
Tells the builder to use the specified factory
|
ImplementationAnd |
usingImplementation(Class<?> implementation)
Tells the builder to use the given implementation
|
Implementation |
withoutGeneratingKeys()
Tells the builder that we are not going to have any auto-generated keys
|
public KeyGeneration useConfiguration(RepositoryFactoryConfiguration configuration)
ConfigurationuseConfiguration in interface Configurationconfiguration - the configurationpublic KeyGeneration useFactory(RepositoryFactory factory)
FactoryuseFactory in interface Factoryfactory - the factorypublic ImplementationAnd usingImplementation(Class<?> implementation)
ImplementationusingImplementation in interface Implementationimplementation - the implementationpublic ImplementationAnd and(Class<?> implementation)
ImplementationAndand in interface ImplementationAndimplementation - the implementationpublic <S extends Serializable> Implementation generateKeysUsing(KeyGenerator<S> keyGenerator)
KeyGenerationgenerateKeysUsing in interface KeyGenerationS - the type of the keyskeyGenerator - the key generatorpublic <S extends Serializable,G extends KeyGenerator<S>> Implementation generateKeysUsing(Class<G> generatorType)
KeyGenerationgenerateKeysUsing in interface KeyGenerationS - the type of the keys the generator will be generatingG - the type of the generatorgeneratorType - the type of the key generator to usepublic Implementation withoutGeneratingKeys()
KeyGenerationwithoutGeneratingKeys in interface KeyGenerationCopyright © 2014–2016. All rights reserved.