From b715aeba40bfb62de2f6a158609dfd81126da25a Mon Sep 17 00:00:00 2001 From: cyBerta Date: Sat, 19 Oct 2019 02:24:39 +0200 Subject: unit tests for gateway manager's gateway selection --- app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/src/main') diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java index a62daca1..075aac71 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java @@ -16,6 +16,8 @@ */ package se.leap.bitmaskclient.eip; +import android.support.annotation.VisibleForTesting; + import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -111,7 +113,8 @@ public class VpnConfigGenerator { + secretsConfiguration(); } - private VpnProfile createProfile(Connection.TransportType transportType) throws IOException, ConfigParser.ConfigParseError, JSONException { + @VisibleForTesting + protected VpnProfile createProfile(Connection.TransportType transportType) throws IOException, ConfigParser.ConfigParseError, JSONException { String configuration = getConfigurationString(transportType); ConfigParser icsOpenvpnConfigParser = new ConfigParser(); icsOpenvpnConfigParser.parseConfig(new StringReader(configuration)); -- cgit v1.2.3