1
1
package com .qiniu .process .qiniu ;
2
2
3
3
import com .qiniu .config .PropertiesFile ;
4
+ import com .qiniu .storage .Configuration ;
4
5
import org .junit .Test ;
5
6
6
7
import java .io .IOException ;
@@ -17,7 +18,7 @@ public void testSingleRefresh() throws IOException {
17
18
PropertiesFile propertiesFile = new PropertiesFile ("resources/.application.properties" );
18
19
String accessKey = propertiesFile .getValue ("ak" );
19
20
String secretKey = propertiesFile .getValue ("sk" );
20
- CdnUrlProcess cdnUrlProcess = new CdnUrlProcess (accessKey , secretKey , null , null , "url" , false , false );
21
+ CdnUrlProcess cdnUrlProcess = new CdnUrlProcess (accessKey , secretKey , new Configuration (), null , null , "url" , false , false );
21
22
String result = cdnUrlProcess .singleResult (new HashMap <String , String >(){{
22
23
put ("url" , "http://xxx.cn/upload/24790f63-0936-44c4-8695-a6d6b1dd8d91.jpg" );
23
24
}});
@@ -30,7 +31,7 @@ public void testBatchRefresh() throws IOException {
30
31
PropertiesFile propertiesFile = new PropertiesFile ("resources/.application.properties" );
31
32
String accessKey = propertiesFile .getValue ("ak" );
32
33
String secretKey = propertiesFile .getValue ("sk" );
33
- CdnUrlProcess cdnUrlProcess = new CdnUrlProcess (accessKey , secretKey , null , null , "url" , true , false ,
34
+ CdnUrlProcess cdnUrlProcess = new CdnUrlProcess (accessKey , secretKey , new Configuration (), null , null , "url" , true , false ,
34
35
"/Users/wubingheng/Downloads/refresh" );
35
36
List <Map <String , String >> list = new ArrayList <>();
36
37
// list.add(new HashMap<String, String>(){{
@@ -64,7 +65,7 @@ public void testBatchPrefetch() throws IOException {
64
65
PropertiesFile propertiesFile = new PropertiesFile ("resources/.application.properties" );
65
66
String accessKey = propertiesFile .getValue ("ak" );
66
67
String secretKey = propertiesFile .getValue ("sk" );
67
- CdnUrlProcess cdnUrlProcess = new CdnUrlProcess (accessKey , secretKey , null , null , "url" , false , true ,
68
+ CdnUrlProcess cdnUrlProcess = new CdnUrlProcess (accessKey , secretKey , new Configuration (), null , null , "url" , false , true ,
68
69
"/Users/wubingheng/Downloads/refresh" );
69
70
List <Map <String , String >> list = new ArrayList <>();
70
71
list .add (new HashMap <String , String >(){{
@@ -85,7 +86,7 @@ public void testClone() throws IOException, CloneNotSupportedException {
85
86
PropertiesFile propertiesFile = new PropertiesFile ("resources/.application.properties" );
86
87
String accessKey = propertiesFile .getValue ("ak" );
87
88
String secretKey = propertiesFile .getValue ("sk" );
88
- CdnUrlProcess cdnUrlProcess = new CdnUrlProcess (accessKey , secretKey , null , null , "url" , false , true ,
89
+ CdnUrlProcess cdnUrlProcess = new CdnUrlProcess (accessKey , secretKey , new Configuration (), null , null , "url" , false , true ,
89
90
"/Users/wubingheng/Downloads/refresh" );
90
91
System .out .println (cdnUrlProcess );
91
92
CdnUrlProcess cdnUrlProcess1 = cdnUrlProcess .clone ();
0 commit comments