Search in sources :

Example 1 with AssertionRemover

use of eu.stamp_project.dspot.assertiongenerator.assertiongenerator.AssertionRemover in project dspot by STAMP-project.

the class AssertionGeneratorTest method testCreateLogOnClassObject.

@Test
public void testCreateLogOnClassObject() throws Exception {
    final CtClass<?> testClass = findClass("fr.inria.sample.TestClassWithoutAssert");
    final CtMethod<?> testOnClass = findMethod(testClass, "testOnClass");
    final AssertionRemover assertionRemover = new AssertionRemover();
    final CtMethod<?> testWithoutAssertions = assertionRemover.removeAssertions(testOnClass, true);
    System.out.println(assertionGenerator.removeAndAmplifyAssertions(testClass, Collections.singletonList(testWithoutAssertions)));
}
Also used : AssertionRemover(eu.stamp_project.dspot.assertiongenerator.assertiongenerator.AssertionRemover) Test(org.junit.Test)

Aggregations

AssertionRemover (eu.stamp_project.dspot.assertiongenerator.assertiongenerator.AssertionRemover)1 Test (org.junit.Test)1