Search in sources :

Example 6 with JacocoCoverageSelector

use of fr.inria.diversify.dspot.selector.JacocoCoverageSelector in project dspot by STAMP-project.

the class DSpotTest method testInheritanceMethod.

@Test
public void testInheritanceMethod() throws Exception {
    /*
            Test that DSpot can be run on an abstract test, using its implementation.
         */
    final InputConfiguration configuration = new InputConfiguration("src/test/resources/sample/sample.properties");
    DSpot dspot = new DSpot(configuration, 3, Collections.singletonList(new TestDataMutator()), new JacocoCoverageSelector());
    CtType<?> ctType = dspot.amplifyTest("fr.inria.inheritance.Inherited").get(0);
    assertEquals(1, ctType.getMethods().size());
}
Also used : JacocoCoverageSelector(fr.inria.diversify.dspot.selector.JacocoCoverageSelector) InputConfiguration(fr.inria.diversify.utils.sosiefier.InputConfiguration) TestDataMutator(fr.inria.diversify.dspot.amplifier.TestDataMutator) Test(org.junit.Test) AbstractTest(fr.inria.AbstractTest)

Aggregations

JacocoCoverageSelector (fr.inria.diversify.dspot.selector.JacocoCoverageSelector)6 InputConfiguration (fr.inria.diversify.utils.sosiefier.InputConfiguration)5 Test (org.junit.Test)4 TestDataMutator (fr.inria.diversify.dspot.amplifier.TestDataMutator)3 AbstractTest (fr.inria.AbstractTest)2 CtType (spoon.reflect.declaration.CtType)2 DSpot (fr.inria.diversify.dspot.DSpot)1 TestMethodCallAdder (fr.inria.diversify.dspot.amplifier.TestMethodCallAdder)1 BufferedReader (java.io.BufferedReader)1 File (java.io.File)1 FileReader (java.io.FileReader)1 IOException (java.io.IOException)1 BeforeClass (org.junit.BeforeClass)1