Search in sources :

Example 6 with JUnitTestReader

use of org.evosuite.junit.JUnitTestReader in project evosuite by EvoSuite.

the class TestTestCaseExpander method testNoAssignment.

@Test
public void testNoAssignment() {
    Properties.PROJECT_PREFIX = "org.evosuite.testsuite";
    JUnitTestReader reader = new JUnitTestReader(null, new String[] { SRCDIR });
    TestCase testCase = reader.readJUnitTestCase(ArrayTestExample1.class.getName() + "#test1");
    testCase.clone();
    String code = testCase.toCode();
    TestCaseExpander expander = new TestCaseExpander();
    TestCase expandedTest = expander.expandTestCase(testCase);
    String expandedCode = expandedTest.toCode();
    Assert.assertEquals(testCase.size() + 20, expandedTest.size());
    Assert.assertFalse(code.equals(expandedCode));
}
Also used : TestCase(org.evosuite.testcase.TestCase) JUnitTestReader(org.evosuite.junit.JUnitTestReader) Test(org.junit.Test)

Aggregations

JUnitTestReader (org.evosuite.junit.JUnitTestReader)6 TestCase (org.evosuite.testcase.TestCase)5 Test (org.junit.Test)5 HashSet (java.util.HashSet)1 LinkedHashSet (java.util.LinkedHashSet)1