use of uk.co.jemos.podam.api.DataProviderStrategy in project podam by devopsfolks.
the class PodamStrategySteps method addOrReplaceSpecific.
@Step("When I add a specific type {2} for an abstract type or interface {1}")
public <T> void addOrReplaceSpecific(PodamFactory podamFactory, Class<T> abstractType, Class<? extends T> concreteType) {
DataProviderStrategy strategy = podamFactory.getStrategy();
strategy.addOrReplaceSpecific(abstractType, concreteType);
}
use of uk.co.jemos.podam.api.DataProviderStrategy in project podam by devopsfolks.
the class TypeManufacturingTest method produceValueForType.
private Object produceValueForType(Class<?> attributeType) {
DataProviderStrategy dataProviderStrategy = podamFactorySteps.givenARandomDataProviderStrategy();
Object pojoInstance = null;
AttributeMetadata attributeMetadata = podamFactorySteps.givenAnAttributeMetadata(SimplePojoToTestSetters.class, pojoInstance, attributeType);
podamValidationSteps.theObjectShouldNotBeNull(attributeMetadata);
Map<String, Type> genericTypeArgumentsMap = new HashMap<String, Type>();
return podamInvocationSteps.whenISendAMessageToTheChannel(dataProviderStrategy, attributeMetadata, genericTypeArgumentsMap, attributeType);
}
use of uk.co.jemos.podam.api.DataProviderStrategy in project podam by devopsfolks.
the class TypeManufacturingTest method podamMessagingSystemShouldReturnAnEnumValue.
@Test
@Title("Podam Messaging System should return an Enum value")
public void podamMessagingSystemShouldReturnAnEnumValue() throws Exception {
DataProviderStrategy dataProviderStrategy = podamFactorySteps.givenARandomDataProviderStrategy();
Object pojoInstance = null;
AttributeMetadata attributeMetadata = podamFactorySteps.givenAnAttributeMetadataForEnums(ExternalRatePodamEnum.class, pojoInstance);
podamValidationSteps.theObjectShouldNotBeNull(attributeMetadata);
Map<String, Type> genericTypeArgumentsMap = new HashMap<String, Type>();
Object payload = podamInvocationSteps.whenISendAMessageToTheChannel(dataProviderStrategy, attributeMetadata, genericTypeArgumentsMap, ExternalRatePodamEnum.class.getSuperclass());
podamValidationSteps.theObjectShouldNotBeNull(payload);
}
Aggregations