This PR adds the possibility to use diff feedback when using an Interactive test.
Usage:
public class InteractiveTest {
@Rule
public final Interactive interactive = Interactive.forClass(SomeExercise.class);
@Test
public void testInvalidOp() throws Throwable {
final String expected = "Expected output from student.";
this.interactive
// Feed some input text.
.feedLines("Input string", "Some other input")
// Run the program.
.callMain()
// Check the output.
.assertOutput(expected);
}
}
Other notable changes
The feedLine methods are deprecated and renamed to feedLines, but are not yet removed to ensure no existing exercises are broken.
It is now possible to use command-line arguments when calling the main function, by using callMain("argument1", "argument2", ...)
This PR adds the possibility to use diff feedback when using an Interactive test.
Usage:
Other notable changes
feedLine
methods are deprecated and renamed tofeedLines
, but are not yet removed to ensure no existing exercises are broken.callMain("argument1", "argument2", ...)