File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
weixin-java-common/src/test/java/me/chanjar/weixin/common/util/http Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
package me .chanjar .weixin .common .util .http ;
2
2
3
3
import me .chanjar .weixin .common .error .WxErrorException ;
4
+ import me .chanjar .weixin .common .util .http .apache .ApacheHttpResponseProxy ;
4
5
import org .testng .annotations .Test ;
5
6
6
7
import static org .testng .Assert .*;
7
8
8
9
public class HttpResponseProxyTest {
9
10
11
+ public final ApacheHttpResponseProxy httpResponseProxy = new ApacheHttpResponseProxy (null );
12
+
10
13
@ Test
11
14
public void testExtractFileNameFromContentString () throws WxErrorException {
12
15
String content = "attachment; filename*=utf-8''%E6%B5%8B%E8%AF%95.xlsx; filename=\" ��.xlsx\" " ;
13
- String filename = HttpResponseProxy .extractFileNameFromContentString (content );
16
+ String filename = httpResponseProxy .extractFileNameFromContentString (content );
14
17
assertNotNull (filename );
15
18
assertEquals (filename , "测试.xlsx" );
16
19
}
@@ -19,7 +22,7 @@ public void testExtractFileNameFromContentString() throws WxErrorException {
19
22
public void testExtractFileNameFromContentString_another () throws WxErrorException {
20
23
String content = "attachment; filename*=utf-8''%E8%90%A5%E4%B8%9A%E6%89%A7%E7%85%A7.jpg; filename=\" ����.jpg\" " ;
21
24
// String content = "attachment; filename=\"����.jpg\"";
22
- String filename = HttpResponseProxy .extractFileNameFromContentString (content );
25
+ String filename = httpResponseProxy .extractFileNameFromContentString (content );
23
26
assertNotNull (filename );
24
27
assertEquals (filename , "营业执照.jpg" );
25
28
}
You can’t perform that action at this time.
0 commit comments