diff options
author | fupduck <fupduck@riseup.net> | 2018-02-06 05:53:09 -0800 |
---|---|---|
committer | fupduck <fupduck@riseup.net> | 2018-02-06 05:53:09 -0800 |
commit | edd34192484f4eb618fdcc2a68b18168c155d63c (patch) | |
tree | d884f63e74911d2ea2cf7bc864414a623e15a2b3 /app/src/sharedTest/java/se.leap.bitmaskclient/testutils | |
parent | c0848bac7ac44f4b09f9e5d66ab71f079cb0f514 (diff) | |
parent | d2d61a16fd2a3ea0fd42073de98d1311b184444d (diff) |
Merge branch '#8832_update_ics-openvpn' into '0.9.8'
#8832 update ics openvpn
See merge request leap/bitmask_android!33
Diffstat (limited to 'app/src/sharedTest/java/se.leap.bitmaskclient/testutils')
-rw-r--r-- | app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java b/app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java new file mode 100644 index 00000000..725924e6 --- /dev/null +++ b/app/src/sharedTest/java/se.leap.bitmaskclient/testutils/TestSetupHelper.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2018 LEAP Encryption Access Project and contributers + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +package se.leap.bitmaskclient.testutils; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +/** + * Created by cyberta on 08.10.17. + */ + +public class TestSetupHelper { + + public static String getInputAsString(InputStream fileAsInputStream) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(fileAsInputStream)); + StringBuilder sb = new StringBuilder(); + String line = br.readLine(); + while (line != null) { + sb.append(line); + line = br.readLine(); + } + + return sb.toString(); + } + +} |