use of uk.co.jemos.podam.common.AbstractConstructorComparator in project podam by devopsfolks.
the class RandomDataProviderStrategyImplInitialisationUnitTest method creatingARandomDataProviderStrategyShouldCreateAConstructorHeavyComparator.
@Test
@Title("Creating a Random Data Provider Strategy should create a constructor heavy comparator")
public void creatingARandomDataProviderStrategyShouldCreateAConstructorHeavyComparator() throws Exception {
AbstractRandomDataProviderStrategy randomStrategy = (AbstractRandomDataProviderStrategy) podamFactorySteps.givenARandomDataProviderStrategy();
AbstractConstructorComparator comparator = randomStrategy.getConstructorHeavyComparator();
podamValidationSteps.theObjectShouldNotBeNull(comparator);
randomStrategy.setConstructorHeavyComparator(null);
podamValidationSteps.theTwoObjectsShouldBeEqual(null, randomStrategy.getConstructorHeavyComparator());
randomStrategy.setConstructorHeavyComparator(comparator);
podamValidationSteps.theTwoObjectsShouldBeEqual(comparator, randomStrategy.getConstructorHeavyComparator());
}
use of uk.co.jemos.podam.common.AbstractConstructorComparator in project podam by devopsfolks.
the class RandomDataProviderStrategyImplInitialisationUnitTest method creatingARandomDataProviderStrategyShouldCreateAConstructorLightComparator.
@Test
@Title("Creating a Random Data Provider Strategy should create a constructor light comparator")
public void creatingARandomDataProviderStrategyShouldCreateAConstructorLightComparator() throws Exception {
AbstractRandomDataProviderStrategy randomStrategy = (AbstractRandomDataProviderStrategy) podamFactorySteps.givenARandomDataProviderStrategy();
AbstractConstructorComparator comparator = randomStrategy.getConstructorLightComparator();
podamValidationSteps.theObjectShouldNotBeNull(comparator);
randomStrategy.setConstructorLightComparator(null);
podamValidationSteps.theTwoObjectsShouldBeEqual(null, randomStrategy.getConstructorLightComparator());
randomStrategy.setConstructorLightComparator(comparator);
podamValidationSteps.theTwoObjectsShouldBeEqual(comparator, randomStrategy.getConstructorLightComparator());
}
Aggregations