Search in sources :

Example 1 with AbstractRandomDataProviderStrategy

use of uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy 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());
}
Also used : AbstractRandomDataProviderStrategy(uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy) AbstractMethodComparator(uk.co.jemos.podam.common.AbstractMethodComparator) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Example 2 with AbstractRandomDataProviderStrategy

use of uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy 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());
}
Also used : AbstractRandomDataProviderStrategy(uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy) AbstractConstructorComparator(uk.co.jemos.podam.common.AbstractConstructorComparator) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Example 3 with AbstractRandomDataProviderStrategy

use of uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy 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());
}
Also used : AbstractRandomDataProviderStrategy(uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy) AbstractMethodComparator(uk.co.jemos.podam.common.AbstractMethodComparator) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Example 4 with AbstractRandomDataProviderStrategy

use of uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy 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());
}
Also used : AbstractRandomDataProviderStrategy(uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy) AbstractConstructorComparator(uk.co.jemos.podam.common.AbstractConstructorComparator) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Aggregations

Title (net.thucydides.core.annotations.Title)4 Test (org.junit.Test)4 AbstractRandomDataProviderStrategy (uk.co.jemos.podam.api.AbstractRandomDataProviderStrategy)4 AbstractConstructorComparator (uk.co.jemos.podam.common.AbstractConstructorComparator)2 AbstractMethodComparator (uk.co.jemos.podam.common.AbstractMethodComparator)2