55import java .io .FileInputStream ;
66import java .io .FileNotFoundException ;
77import java .io .ByteArrayInputStream ;
8- import java .util .Arrays ;
98
109import com .nerox .client .keepalives .UDPKeepAlive ;
1110import com .nerox .client .security .Cryptography ;
@@ -24,8 +23,14 @@ public AppTest(){
2423 String path = System .getProperty ("basedir" );
2524 try {
2625 FileInputStream fis = new FileInputStream (this .joinPaths (path , "src/test/files/PublicKey.pem" ));
27- this .tfprotocol = new Tfprotocol ("localhost" , 10345 , fis ,
28- "testhash" , 36 , "0.0" , callback );
26+ this .tfprotocol = new Tfprotocol (
27+ "localhost" ,
28+ 10345 ,
29+ fis ,
30+ "testhash" ,
31+ 36 ,
32+ "0.0" ,
33+ callback );
2934 }catch (FileNotFoundException ignored ){
3035 assertTrue ("File not found" , false );
3136 }
@@ -37,6 +42,7 @@ public AppTest(){
3742 private String normalizePath (String path ){
3843 return this .normalizePath (path , "/" );
3944 }
45+
4046 private String normalizePath (String path , String usingSeparator ){
4147 String sep = System .getProperty ("file.separator" );
4248 return path .replace (usingSeparator , sep );
@@ -57,12 +63,12 @@ private String joinPaths(String ...paths){
5763 }
5864 @ Test
5965 public void runAllTests (){
60- this .tfprotocolDoesConnect ();
61- this .loginCommand ();
62- //this.setfsidCommand();
63- //this.setfspermCommand();
64- this .supCommand ();
65-
66+ this .tfprotocolDoesConnect ();
67+ // this.loginCommand();
68+ //this.setfsidCommand();
69+ //this.setfspermCommand();
70+ this .supCommand ();
71+ this . statCommand ();
6672 }
6773
6874 public void tfprotocolDoesConnect ()
@@ -83,7 +89,15 @@ public void setfspermCommand(){
8389 }
8490
8591 public void supCommand (){
86- ByteArrayInputStream stream = new ByteArrayInputStream (Cryptography .getRandomBytes (99 ));
87- this .tfprotocol .supCommand ("test" , stream , 0 );
92+ ByteArrayInputStream stream = new ByteArrayInputStream (Cryptography .getRandomBytes (99 ));
93+ assertTrue (
94+ this .tfprotocol .supCommand (
95+ "operadores/34f5e8394fced10a0df515647ed582b93b5aa7cb743ce93ec7a287b15aa63014.sd/34f5e8394fced10a0df515647ed582b93b5aa7cb743ce93ec7a287b15aa63014.json" ,
96+ stream ,
97+ 0 )
98+ );
99+ }
100+ public void statCommand (){
101+ this .tfprotocol .fstatCommand ("operadores/34f5e8394fced10a0df515647ed582b93b5aa7cb743ce93ec7a287b15aa63014.sd/34f5e8394fced10a0df515647ed582b93b5aa7cb743ce93ec7a287b15aa63014.json" );
88102 }
89103}
0 commit comments