1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-22 20:31:16 +00:00

Fixed tests.

This commit is contained in:
Felix Ableitner 2016-03-24 12:57:27 +01:00
parent 8a85edfac1
commit 85bc301781
2 changed files with 4 additions and 4 deletions

View file

@ -40,7 +40,7 @@ public class DevicesAdapterTest extends AndroidTestCase {
@MediumTest
public void testGetViewNoConnections() {
mAdapter.add(Arrays.asList(mDevice));
mAdapter.addAll(Arrays.asList(mDevice));
View v = mAdapter.getView(0, null, null);
assertEquals(mDevice.name, ((TextView) v.findViewById(R.id.name)).getText());
@ -53,7 +53,7 @@ public class DevicesAdapterTest extends AndroidTestCase {
@MediumTest
public void testGetViewConnections() {
mAdapter.add(Arrays.asList(mDevice));
mAdapter.addAll(Arrays.asList(mDevice));
mAdapter.onReceiveConnections(
new HashMap<String, RestApi.Connection>() {{ put(mDevice.deviceID, mConnection); }});
View v = mAdapter.getView(0, null, null);

View file

@ -40,7 +40,7 @@ public class FoldersAdapterTest extends AndroidTestCase {
}
public void testGetViewNoModel() {
mAdapter.add(Arrays.asList(mFolder));
mAdapter.addAll(Arrays.asList(mFolder));
View v = mAdapter.getView(0, null, null);
assertEquals(mFolder.id, ((TextView) v.findViewById(R.id.id)).getText());
assertEquals(mFolder.path, ((TextView) v.findViewById(R.id.directory)).getText());
@ -48,7 +48,7 @@ public class FoldersAdapterTest extends AndroidTestCase {
}
public void testGetViewModel() {
mAdapter.add(Arrays.asList(mFolder));
mAdapter.addAll(Arrays.asList(mFolder));
mAdapter.onReceiveModel(mFolder.id, mModel);
View v = mAdapter.getView(0, null, null);
assertFalse(((TextView) v.findViewById(R.id.state)).getText().toString().equals(""));