mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 14:21:16 +00:00
Fixed tests.
This commit is contained in:
parent
8a85edfac1
commit
85bc301781
2 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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(""));
|
||||
|
|
Loading…
Reference in a new issue