mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-23 04:41:16 +00:00
Updated unit tests.
This commit is contained in:
parent
78789730bd
commit
9f3b97531a
3 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,7 @@ public class MockRestApi extends RestApi {
|
|||
public MockRestApi(Context context, String url, String apiKey,
|
||||
String guiUser, String guiPassword,
|
||||
OnApiAvailableListener listener) {
|
||||
super(context, url, apiKey, guiUser, guiPassword, listener);
|
||||
super(context, url, apiKey, guiUser, guiPassword, listener, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -45,7 +45,7 @@ public class RestApiTest extends AndroidTestCase {
|
|||
public void onApiAvailable() {
|
||||
latch.countDown();
|
||||
}
|
||||
});
|
||||
}, null);
|
||||
latch.await(1, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.nutomic.syncthingandroid.R;
|
|||
import com.nutomic.syncthingandroid.syncthing.RestApi;
|
||||
import com.nutomic.syncthingandroid.util.DevicesAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
@ -25,7 +26,8 @@ public class DevicesAdapterTest extends AndroidTestCase {
|
|||
super.setUp();
|
||||
|
||||
mAdapter = new DevicesAdapter(getContext());
|
||||
mDevice.addresses = "127.0.0.1:12345";
|
||||
mDevice.addresses = new ArrayList<>();
|
||||
mDevice.addresses.add("127.0.0.1:12345");
|
||||
mDevice.name = "the device";
|
||||
mDevice.deviceID = "123-456-789";
|
||||
|
||||
|
|
Loading…
Reference in a new issue