use of org.evosuite.instrumentation.InstrumentingClassLoader in project evosuite by EvoSuite.
the class MockJOptionPaneShowInputDialogTest method testShowOptionDialog.
@Test
public void testShowOptionDialog() throws Exception {
TestSuiteChromosome suite = new TestSuiteChromosome();
InstrumentingClassLoader cl = new InstrumentingClassLoader();
TestCase t1 = buildTestCase0(cl);
suite.addTest(t1);
BranchCoverageSuiteFitness ff = new BranchCoverageSuiteFitness(cl);
ff.getFitness(suite);
Set<TestFitnessFunction> coveredGoals = suite.getCoveredGoals();
Assert.assertEquals(7, coveredGoals.size());
}
use of org.evosuite.instrumentation.InstrumentingClassLoader in project evosuite by EvoSuite.
the class MockJOptionPaneShowInternalInputDialogTest method testShowInternalInputDialog.
@Test
public void testShowInternalInputDialog() throws Exception {
TestSuiteChromosome suite = new TestSuiteChromosome();
InstrumentingClassLoader cl = new InstrumentingClassLoader();
TestCase t1 = buildTestCase0(cl);
suite.addTest(t1);
BranchCoverageSuiteFitness ff = new BranchCoverageSuiteFitness(cl);
ff.getFitness(suite);
Set<TestFitnessFunction> coveredGoals = suite.getCoveredGoals();
Assert.assertEquals(4, coveredGoals.size());
}
use of org.evosuite.instrumentation.InstrumentingClassLoader in project evosuite by EvoSuite.
the class MockJOptionPaneShowConfirmDialogTest method testShowConfirmDialogs.
@Test
public void testShowConfirmDialogs() throws Exception {
TestSuiteChromosome suite = new TestSuiteChromosome();
InstrumentingClassLoader cl = new InstrumentingClassLoader();
TestCase t1 = buildTestCase0(cl);
suite.addTest(t1);
BranchCoverageSuiteFitness ff = new BranchCoverageSuiteFitness(cl);
ff.getFitness(suite);
Set<TestFitnessFunction> coveredGoals = suite.getCoveredGoals();
Assert.assertEquals(5, coveredGoals.size());
}
use of org.evosuite.instrumentation.InstrumentingClassLoader in project evosuite by EvoSuite.
the class MockJOptionPaneShowInternalConfirmDialogTest method testShowInternalConfirmDialog.
@Test
public void testShowInternalConfirmDialog() throws Exception {
TestSuiteChromosome suite = new TestSuiteChromosome();
InstrumentingClassLoader cl = new InstrumentingClassLoader();
TestCase t0 = buildTestCase0(cl);
TestCase t1 = buildTestCase1(cl);
suite.addTest(t0);
suite.addTest(t1);
BranchCoverageSuiteFitness ff = new BranchCoverageSuiteFitness(cl);
ff.getFitness(suite);
Set<TestFitnessFunction> coveredGoals = suite.getCoveredGoals();
Assert.assertEquals(3, coveredGoals.size());
}
use of org.evosuite.instrumentation.InstrumentingClassLoader in project evosuite by EvoSuite.
the class MockJOptionPaneShowInternalMessageDialogTest method testShowInternalMessageDialog.
@Test
public void testShowInternalMessageDialog() throws Exception {
TestSuiteChromosome suite = new TestSuiteChromosome();
InstrumentingClassLoader cl = new InstrumentingClassLoader();
TestCase t0 = buildTestCase0(cl);
TestCase t1 = buildTestCase1(cl);
suite.addTest(t0);
suite.addTest(t1);
BranchCoverageSuiteFitness ff = new BranchCoverageSuiteFitness(cl);
ff.getFitness(suite);
Set<TestFitnessFunction> coveredGoals = suite.getCoveredGoals();
Assert.assertEquals(3, coveredGoals.size());
}
Aggregations