use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class MockJOptionPaneShowMessageDialogTest method buildTestCase2TrueBranch.
private static TestCase buildTestCase2TrueBranch(InstrumentingClassLoader cl) throws ClassNotFoundException, NoSuchMethodException, SecurityException {
TestCaseBuilder builder = new TestCaseBuilder();
Class<?> clazz = cl.loadClass(ShowMessageDialogExample.class.getCanonicalName());
Constructor<?> constructor = clazz.getConstructor();
VariableReference showMessageDialogExample0 = builder.appendConstructor(constructor);
VariableReference int0 = builder.appendIntPrimitive(0);
Method showMessageDialogMethod = clazz.getMethod("showMessageDialog2", int.class);
builder.appendMethod(showMessageDialogExample0, showMessageDialogMethod, int0);
return builder.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverStringFunctions method buildTestStartsWith.
private static DefaultTestCase buildTestStartsWith() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference string0 = tc.appendStringPrimitive("Hello World");
Method method = TestCaseStringStartsWith.class.getMethod("test", String.class);
tc.appendMethod(null, method, string0);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverStringFunctions method buildTestCompareTo.
private static DefaultTestCase buildTestCompareTo() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference string0 = tc.appendStringPrimitive("Hello");
Method method = TestCaseStringCompareTo.class.getMethod("test", String.class);
tc.appendMethod(null, method, string0);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverStringFunctions method buildTestEndsWith.
private static DefaultTestCase buildTestEndsWith() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference string0 = tc.appendStringPrimitive("Hello World");
Method method = TestCaseStringEndsWith.class.getMethod("test", String.class);
tc.appendMethod(null, method, string0);
return tc.getDefaultTestCase();
}
use of org.evosuite.symbolic.TestCaseBuilder in project evosuite by EvoSuite.
the class TestSolverStringFunctions method buildTestTrim.
private static DefaultTestCase buildTestTrim() throws SecurityException, NoSuchMethodException {
TestCaseBuilder tc = new TestCaseBuilder();
VariableReference string0 = tc.appendStringPrimitive(" Hello World ");
Method method = TestCaseStringTrim.class.getMethod("test", String.class);
tc.appendMethod(null, method, string0);
return tc.getDefaultTestCase();
}
Aggregations