use of uk.co.jemos.podam.common.AbstractMethodComparator in project podam by devopsfolks.
the class RandomDataProviderStrategyImplInitialisationUnitTest method creatingARandomDataProviderStrategyShouldCreateAMethodLightComparator.
@Test
@Title("Creating a Random Data Provider Strategy should create a Method light comparator")
public void creatingARandomDataProviderStrategyShouldCreateAMethodLightComparator() throws Exception {
AbstractRandomDataProviderStrategy randomStrategy = (AbstractRandomDataProviderStrategy) podamFactorySteps.givenARandomDataProviderStrategy();
AbstractMethodComparator comparator = randomStrategy.getMethodLightComparator();
podamValidationSteps.theObjectShouldNotBeNull(comparator);
randomStrategy.setMethodLightComparator(null);
podamValidationSteps.theTwoObjectsShouldBeEqual(null, randomStrategy.getMethodLightComparator());
randomStrategy.setMethodLightComparator(comparator);
podamValidationSteps.theTwoObjectsShouldBeEqual(comparator, randomStrategy.getMethodLightComparator());
}
use of uk.co.jemos.podam.common.AbstractMethodComparator in project podam by devopsfolks.
the class RandomDataProviderStrategyImplInitialisationUnitTest method creatingARandomDataProviderStrategyShouldCreateAMethodHeavyComparator.
@Test
@Title("Creating a Random Data Provider Strategy should create a Method heavy comparator")
public void creatingARandomDataProviderStrategyShouldCreateAMethodHeavyComparator() throws Exception {
AbstractRandomDataProviderStrategy randomStrategy = (AbstractRandomDataProviderStrategy) podamFactorySteps.givenARandomDataProviderStrategy();
AbstractMethodComparator comparator = randomStrategy.getMethodHeavyComparator();
podamValidationSteps.theObjectShouldNotBeNull(comparator);
randomStrategy.setMethodHeavyComparator(null);
podamValidationSteps.theTwoObjectsShouldBeEqual(null, randomStrategy.getMethodHeavyComparator());
randomStrategy.setMethodHeavyComparator(comparator);
podamValidationSteps.theTwoObjectsShouldBeEqual(comparator, randomStrategy.getMethodHeavyComparator());
}
Aggregations