use of net.thucydides.core.annotations.Step in project podam by devopsfolks.
the class PodamFactorySteps method givenAStandardPodamFactoryWithMemoizationEnabled.
@Step("Given a Standard Podam Factory with memoization enabled")
public PodamFactory givenAStandardPodamFactoryWithMemoizationEnabled() {
PodamFactory podamFactory = givenAStandardPodamFactory();
DataProviderStrategy strategyWithMemoization = givenADataProviderStrategyWithMemoizationSetToTrue();
podamFactory.setStrategy(strategyWithMemoization);
return podamFactory;
}
use of net.thucydides.core.annotations.Step in project podam by devopsfolks.
the class PodamFactorySteps method givenADataProviderStrategyWithMemoizationSetToTrue.
@Step("Given a Random Data Provider Strategy with memoization set to true")
public DataProviderStrategy givenADataProviderStrategyWithMemoizationSetToTrue() {
DataProviderStrategy strategy = new RandomDataProviderStrategyImpl();
strategy.setMemoization(true);
return strategy;
}
use of net.thucydides.core.annotations.Step in project podam by devopsfolks.
the class PodamFactorySteps method givenAnAttributeMetadataForEnums.
@Step("Given an Attribute Meta Data object for Enums")
public AttributeMetadata givenAnAttributeMetadataForEnums(Class<?> pojoClass, Object pojoInstance) {
if (null == pojoClass) {
throw new IllegalArgumentException("pojoClass cannot be null");
}
String attributeName = null;
Class<?> realAttributeType = pojoClass;
Type realGenericType = pojoClass;
Type[] genericTypeArgs = new Type[0];
List<Annotation> annotations = Collections.emptyList();
AttributeMetadata attributeMetadata = new AttributeMetadata(attributeName, realAttributeType, realGenericType, genericTypeArgs, annotations, pojoClass, pojoInstance);
return attributeMetadata;
}
use of net.thucydides.core.annotations.Step 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 net.thucydides.core.annotations.Step in project podam by devopsfolks.
the class RecursivePojoValidationSteps method allPojosInTheRecursiveStrategyShouldBeValid.
@Step("Then all the POJOs in the recursive hierarchy should be valid")
public void allPojosInTheRecursiveStrategyShouldBeValid(RecursivePojo pojo) {
assertThat("The integer value in the pojo should not be zero!", pojo.getIntField(), not(equalTo(0)));
RecursivePojo parentPojo = pojo.getParent();
assertThat("The parent pojo cannot be null!", parentPojo, not(nullValue()));
assertThat("The integer value in the parent pojo should not be zero!", parentPojo.getIntField(), not(equalTo(0)));
assertThat("The parent attribute of the parent pojo cannot be null!", parentPojo.getParent(), not(nullValue()));
}
Aggregations