diff options
author | cyBerta <cyberta@riseup.net> | 2024-10-10 20:19:04 +0200 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2024-12-11 00:09:34 +0000 |
commit | 5484bac21a3b1df96ec7b2a4d4d87df47933e069 (patch) | |
tree | ed9fc06cfabf91dfa7a1416005a0c12fd6376200 /app/src/test/java/se/leap | |
parent | 3eb2fac776cc9222a756dcf474eaae6d386a1de3 (diff) |
refactoring in Provider class: replace DefaultURL with strings, keep api as integer instead of a string
Diffstat (limited to 'app/src/test/java/se/leap')
-rw-r--r-- | app/src/test/java/se/leap/bitmaskclient/providersetup/ProviderManagerTest.java | 2 | ||||
-rw-r--r-- | app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/src/test/java/se/leap/bitmaskclient/providersetup/ProviderManagerTest.java b/app/src/test/java/se/leap/bitmaskclient/providersetup/ProviderManagerTest.java index 925d2464..d76e87c2 100644 --- a/app/src/test/java/se/leap/bitmaskclient/providersetup/ProviderManagerTest.java +++ b/app/src/test/java/se/leap/bitmaskclient/providersetup/ProviderManagerTest.java @@ -162,7 +162,7 @@ public class ProviderManagerTest { providerManager.setAddDummyEntry(true); providerManager.clear(); assertEquals("1 providers", 1, providerManager.providers().size()); - assertEquals("provider is dummy element", "https://example.net", providerManager.get(0).getMainUrlString()); + assertEquals("provider is dummy element", "https://example.net", providerManager.get(0).getMainUrl()); } @Test diff --git a/app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java b/app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java index 5434e7bd..c89d08cb 100644 --- a/app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java +++ b/app/src/test/java/se/leap/bitmaskclient/testutils/MockHelper.java @@ -259,9 +259,9 @@ public class MockHelper { sharedPreferences.edit(). putString(Provider.PROVIDER_IP + "." + providerDomain, provider.getProviderIp()). putString(Provider.PROVIDER_API_IP + "." + providerDomain, provider.getProviderApiIp()). - putString(Provider.MAIN_URL + "." + providerDomain, provider.getMainUrlString()). - putString(Provider.GEOIP_URL + "." + providerDomain, provider.getGeoipUrl().toString()). - putString(Provider.MOTD_URL + "." + providerDomain, provider.getMotdUrl().toString()). + putString(Provider.MAIN_URL + "." + providerDomain, provider.getMainUrl()). + putString(Provider.GEOIP_URL + "." + providerDomain, provider.getGeoipUrl()). + putString(Provider.MOTD_URL + "." + providerDomain, provider.getMotdUrl()). putString(Provider.KEY + "." + providerDomain, provider.getDefinitionString()). putString(Provider.CA_CERT + "." + providerDomain, provider.getCaCert()). putString(PROVIDER_EIP_DEFINITION + "." + providerDomain, provider.getEipServiceJsonString()). |