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 11package me .chanjar .weixin .common .util .http ;
22
33import me .chanjar .weixin .common .error .WxErrorException ;
4+ import me .chanjar .weixin .common .util .http .apache .ApacheHttpResponseProxy ;
45import org .testng .annotations .Test ;
56
67import static org .testng .Assert .*;
78
89public class HttpResponseProxyTest {
910
11+ public final ApacheHttpResponseProxy httpResponseProxy = new ApacheHttpResponseProxy (null );
12+
1013 @ Test
1114 public void testExtractFileNameFromContentString () throws WxErrorException {
1215 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 );
1417 assertNotNull (filename );
1518 assertEquals (filename , "测试.xlsx" );
1619 }
@@ -19,7 +22,7 @@ public void testExtractFileNameFromContentString() throws WxErrorException {
1922 public void testExtractFileNameFromContentString_another () throws WxErrorException {
2023 String content = "attachment; filename*=utf-8''%E8%90%A5%E4%B8%9A%E6%89%A7%E7%85%A7.jpg; filename=\" ����.jpg\" " ;
2124// String content = "attachment; filename=\"����.jpg\"";
22- String filename = HttpResponseProxy .extractFileNameFromContentString (content );
25+ String filename = httpResponseProxy .extractFileNameFromContentString (content );
2326 assertNotNull (filename );
2427 assertEquals (filename , "营业执照.jpg" );
2528 }
You can’t perform that action at this time.
0 commit comments