public class DialogRunnerTest
{
- public class MockDialog implements DialogRunnerI
+ public class MockDialog implements DialogRunnerI<MockDialog>
{
DialogRunner<MockDialog> runner = new DialogRunner<>(this);
@Override
- public MockDialog response(RunResponse action)
+ public MockDialog addResponse(RunResponse action)
{
- return runner.response(action);
+ return runner.addResponse(action);
}
public void doDialog(String resp)
Assert.assertFalse(dialog.runner.isRegistered(ok));
- dialog.response(ok).response(cancel).response(help).response(ineed);
+ dialog.addResponse(ok).addResponse(cancel).addResponse(help).addResponse(ineed);
Assert.assertTrue(dialog.runner.isRegistered(ok));