File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
src/test/java/io/appium/java_client Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 11package io .appium .java_client ;
22
3- import org .apache .commons .codec .binary .Base64 ;
43import org .junit .After ;
54import org .junit .Before ;
65import org .junit .Test ;
@@ -89,12 +88,4 @@ public void ErrorTest() {
8988 driver .findElementByAndroidUIAutomator (null );
9089 }
9190
92- @ Test
93- public void pushFileTest () {
94- byte [] data = Base64 .encodeBase64 ("The eventual code is no more than the deposit of your understanding. ~E. W. Dijkstra" .getBytes ());
95- driver .pushFile ("/data/local/tmp/remote.txt" , data );
96- byte [] returnData = driver .pullFile ("/data/local/tmp/remote.txt" );
97- String returnDataDecoded = new String (Base64 .decodeBase64 (returnData ));
98- assertEquals ("The eventual code is no more than the deposit of your understanding. ~E. W. Dijkstra" , returnDataDecoded );
99- }
10091}
Original file line number Diff line number Diff line change 1717
1818package io .appium .java_client ;
1919
20+ import org .apache .commons .codec .binary .Base64 ;
2021import org .junit .After ;
2122import org .junit .Before ;
2223import org .junit .Test ;
@@ -95,4 +96,13 @@ public void closeAppTest() throws InterruptedException {
9596 driver .launchApp ();
9697 assertEquals (".ApiDemos" , driver .currentActivity ());
9798 }
99+
100+ @ Test
101+ public void pushFileTest () {
102+ byte [] data = Base64 .encodeBase64 ("The eventual code is no more than the deposit of your understanding. ~E. W. Dijkstra" .getBytes ());
103+ driver .pushFile ("/data/local/tmp/remote.txt" , data );
104+ byte [] returnData = driver .pullFile ("/data/local/tmp/remote.txt" );
105+ String returnDataDecoded = new String (Base64 .decodeBase64 (returnData ));
106+ assertEquals ("The eventual code is no more than the deposit of your understanding. ~E. W. Dijkstra" , returnDataDecoded );
107+ }
98108}
You can’t perform that action at this time.
0 commit comments