summaryrefslogtreecommitdiff
path: root/app/src/test/java/se/leap/bitmaskclient/eip/EipStatusTest.java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-07-04 16:44:35 +0200
committercyBerta <cyberta@riseup.net>2019-08-02 01:49:37 +0200
commit283e7531d551521dc48efa9b010127ff54316326 (patch)
tree79682df8fae07b85a583d059a6c7a4f82fb8afe6 /app/src/test/java/se/leap/bitmaskclient/eip/EipStatusTest.java
parent2a8bb775183dd08388460c711dc650d3110ca76c (diff)
create one vpnprofile per transport per gateway. implement basis to switch between obfs4 and plain openvpn connections
Diffstat (limited to 'app/src/test/java/se/leap/bitmaskclient/eip/EipStatusTest.java')
-rw-r--r--app/src/test/java/se/leap/bitmaskclient/eip/EipStatusTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/test/java/se/leap/bitmaskclient/eip/EipStatusTest.java b/app/src/test/java/se/leap/bitmaskclient/eip/EipStatusTest.java
index 8495f962..8ba7f5fc 100644
--- a/app/src/test/java/se/leap/bitmaskclient/eip/EipStatusTest.java
+++ b/app/src/test/java/se/leap/bitmaskclient/eip/EipStatusTest.java
@@ -10,6 +10,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
import de.blinkt.openvpn.VpnProfile;
import de.blinkt.openvpn.core.ConnectionStatus;
import de.blinkt.openvpn.core.VpnStatus;
+import de.blinkt.openvpn.core.connection.Connection;
import se.leap.bitmaskclient.R;
import se.leap.bitmaskclient.testutils.MockHelper;
import se.leap.bitmaskclient.testutils.TestSetupHelper;
@@ -23,6 +24,7 @@ import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_START;
import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_VPNPAUSED;
import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_WAITING_FOR_USER_INPUT;
import static de.blinkt.openvpn.core.ConnectionStatus.UNKNOWN_LEVEL;
+import static de.blinkt.openvpn.core.connection.Connection.TransportType.OPENVPN;
import static junit.framework.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.anyString;
import static org.powermock.api.mockito.PowerMockito.doNothing;
@@ -61,7 +63,7 @@ public class EipStatusTest {
public void testUpdateState_LEVEL_VPNPAUSED_hasPersistentTun() throws Exception {
mockStatic(PreferenceHelper.class);
- VpnProfile mockVpnProfile = new VpnProfile("mockProfile");
+ VpnProfile mockVpnProfile = new VpnProfile("mockProfile", OPENVPN);
mockVpnProfile.mPersistTun = true;
doNothing().when(PreferenceHelper.class);
VpnStatus.setLastConnectedVpnProfile(null, mockVpnProfile);
@@ -74,7 +76,7 @@ public class EipStatusTest {
public void testUpdateState_LEVEL_VPNPAUSED_hasNotPersistentTun() throws Exception {
mockStatic(PreferenceHelper.class);
- VpnProfile mockVpnProfile = new VpnProfile("mockProfile");
+ VpnProfile mockVpnProfile = new VpnProfile("mockProfile", OPENVPN);
mockVpnProfile.mPersistTun = false;
doNothing().when(PreferenceHelper.class);
VpnStatus.setLastConnectedVpnProfile(null, mockVpnProfile);