mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Changed callback arguments to varargs and renamed a method.
This commit is contained in:
@@ -4,13 +4,13 @@ import java.util.Map;
|
||||
|
||||
public interface TransportCallback {
|
||||
|
||||
void setLocalTransports(Map<String, String> transports);
|
||||
void setLocalProperties(Map<String, String> properties);
|
||||
|
||||
void setConfig(Map<String, String> config);
|
||||
|
||||
void showMessage(String message);
|
||||
void showMessage(String... message);
|
||||
|
||||
boolean showConfirmationMessage(String message);
|
||||
boolean showConfirmationMessage(String... message);
|
||||
|
||||
int showChoice(String message, String[] choices);
|
||||
int showChoice(String[] choices, String... message);
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ public class RemovableDrivePluginTest extends TestCase {
|
||||
oneOf(monitor).start(with(any(Callback.class)));
|
||||
oneOf(finder).findRemovableDrives();
|
||||
will(returnValue(drives));
|
||||
oneOf(callback).showChoice(with(any(String.class)),
|
||||
with(any(String[].class)));
|
||||
oneOf(callback).showChoice(with(any(String[].class)),
|
||||
with(any(String.class)));
|
||||
will(returnValue(-1)); // The user cancelled the choice
|
||||
}});
|
||||
|
||||
@@ -136,8 +136,8 @@ public class RemovableDrivePluginTest extends TestCase {
|
||||
oneOf(monitor).start(with(any(Callback.class)));
|
||||
oneOf(finder).findRemovableDrives();
|
||||
will(returnValue(drives));
|
||||
oneOf(callback).showChoice(with(any(String.class)),
|
||||
with(any(String[].class)));
|
||||
oneOf(callback).showChoice(with(any(String[].class)),
|
||||
with(any(String.class)));
|
||||
will(returnValue(0)); // The user chose drive1 but it doesn't exist
|
||||
}});
|
||||
|
||||
@@ -175,8 +175,8 @@ public class RemovableDrivePluginTest extends TestCase {
|
||||
oneOf(monitor).start(with(any(Callback.class)));
|
||||
oneOf(finder).findRemovableDrives();
|
||||
will(returnValue(drives));
|
||||
oneOf(callback).showChoice(with(any(String.class)),
|
||||
with(any(String[].class)));
|
||||
oneOf(callback).showChoice(with(any(String[].class)),
|
||||
with(any(String.class)));
|
||||
will(returnValue(0)); // The user chose drive1 but it's not a dir
|
||||
}});
|
||||
|
||||
@@ -214,8 +214,8 @@ public class RemovableDrivePluginTest extends TestCase {
|
||||
oneOf(monitor).start(with(any(Callback.class)));
|
||||
oneOf(finder).findRemovableDrives();
|
||||
will(returnValue(drives));
|
||||
oneOf(callback).showChoice(with(any(String.class)),
|
||||
with(any(String[].class)));
|
||||
oneOf(callback).showChoice(with(any(String[].class)),
|
||||
with(any(String.class)));
|
||||
will(returnValue(0)); // The user chose drive1
|
||||
}});
|
||||
|
||||
@@ -256,8 +256,8 @@ public class RemovableDrivePluginTest extends TestCase {
|
||||
oneOf(monitor).start(with(any(Callback.class)));
|
||||
oneOf(finder).findRemovableDrives();
|
||||
will(returnValue(drives));
|
||||
oneOf(callback).showChoice(with(any(String.class)),
|
||||
with(any(String[].class)));
|
||||
oneOf(callback).showChoice(with(any(String[].class)),
|
||||
with(any(String.class)));
|
||||
will(returnValue(0)); // The user chose drive1
|
||||
oneOf(callback).showMessage(with(any(String.class)));
|
||||
}});
|
||||
|
||||
Reference in New Issue
Block a user