package jalview.util.dialogrunner;
-import org.testng.Assert;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
import org.testng.annotations.Test;
+import junit.extensions.PA;
+
public class DialogRunnerTest
{
- public class MockDialog implements DialogRunnerI
+ public class MockDialog implements DialogRunnerI<MockDialog>
{
- DialogRunner<MockDialog> runner = new DialogRunner<>(this);
+ DialogRunnerI runner = new DialogRunner();
@Override
- public MockDialog addResponse(RunResponse action)
+ public DialogRunnerI addResponse(Object response, RunResponse action)
{
- return runner.addResponse(action);
+ return runner.addResponse(response, action);
}
- public void doDialog(String resp)
+ public List<RunResponse> doDialog(String resp)
{
- runner.firstRun(resp);
+ return runner.handleResponse(resp);
}
+
+ @Override
+ public List<RunResponse> handleResponse(Object response)
+ {
+ return null;
+ }
}
MockDialog dialog = new MockDialog();