summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2024-01-24 22:14:48 +0100
committercyBerta <cyberta@riseup.net>2024-01-24 22:14:48 +0100
commitb73cb05bdcbf9947d0d0ea8c56e894baa395c7f1 (patch)
treeb99269e843178ed1e3f0e4a0772a400569864c6b /app
parentcf5d8edf1693c647fd91c7d1191fbf5d43b911fc (diff)
fix ProviderTest
Diffstat (limited to 'app')
-rw-r--r--app/src/test/java/se/leap/bitmaskclient/base/models/ProviderTest.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/app/src/test/java/se/leap/bitmaskclient/base/models/ProviderTest.java b/app/src/test/java/se/leap/bitmaskclient/base/models/ProviderTest.java
index 8bff690b..40d9927b 100644
--- a/app/src/test/java/se/leap/bitmaskclient/base/models/ProviderTest.java
+++ b/app/src/test/java/se/leap/bitmaskclient/base/models/ProviderTest.java
@@ -1,6 +1,8 @@
package se.leap.bitmaskclient.base.models;
import static junit.framework.Assert.assertFalse;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
@@ -11,9 +13,6 @@ import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
-import java.util.HashSet;
-import java.util.Set;
-
import se.leap.bitmaskclient.base.utils.ConfigHelper;
import se.leap.bitmaskclient.testutils.TestSetupHelper;
@@ -61,14 +60,12 @@ public class ProviderTest {
Provider p2 = TestSetupHelper.getConfiguredProvider();
p2.setMainUrl("http://somethingsdiffer.org");
Provider p3 = new Provider("https://anotherprovider.net");
+ Provider p4 = TestSetupHelper.getConfiguredProvider();
- Set<Provider> defaultProviders = new HashSet<>();
- defaultProviders.add(p1);
- defaultProviders.add(p2);
+ assertEquals(p1, p4);
+ assertNotEquals(p1, p2);
+ assertNotEquals(p1, p3);
- assertTrue(defaultProviders.contains(p1));
- assertTrue(defaultProviders.contains(p2));
- assertFalse(defaultProviders.contains(p3));
}
@Test