1
0
Fork 0
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:
Felix Ableitner 2016-03-08 01:12:26 +01:00
parent 78789730bd
commit 9f3b97531a
3 changed files with 5 additions and 3 deletions

View file

@ -13,7 +13,7 @@ public class MockRestApi extends RestApi {
public MockRestApi(Context context, String url, String apiKey, public MockRestApi(Context context, String url, String apiKey,
String guiUser, String guiPassword, String guiUser, String guiPassword,
OnApiAvailableListener listener) { OnApiAvailableListener listener) {
super(context, url, apiKey, guiUser, guiPassword, listener); super(context, url, apiKey, guiUser, guiPassword, listener, null);
} }
@Override @Override

View file

@ -45,7 +45,7 @@ public class RestApiTest extends AndroidTestCase {
public void onApiAvailable() { public void onApiAvailable() {
latch.countDown(); latch.countDown();
} }
}); }, null);
latch.await(1, TimeUnit.SECONDS); latch.await(1, TimeUnit.SECONDS);
} }

View file

@ -9,6 +9,7 @@ import com.nutomic.syncthingandroid.R;
import com.nutomic.syncthingandroid.syncthing.RestApi; import com.nutomic.syncthingandroid.syncthing.RestApi;
import com.nutomic.syncthingandroid.util.DevicesAdapter; import com.nutomic.syncthingandroid.util.DevicesAdapter;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
@ -25,7 +26,8 @@ public class DevicesAdapterTest extends AndroidTestCase {
super.setUp(); super.setUp();
mAdapter = new DevicesAdapter(getContext()); 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.name = "the device";
mDevice.deviceID = "123-456-789"; mDevice.deviceID = "123-456-789";