mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -14,7 +14,6 @@ package org.dromara.hutool.http.client.engine.jdk;
|
||||
|
||||
import org.dromara.hutool.core.io.IoUtil;
|
||||
import org.dromara.hutool.core.io.stream.EmptyInputStream;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.dromara.hutool.core.array.ArrayUtil;
|
||||
import org.dromara.hutool.core.util.ObjUtil;
|
||||
import org.dromara.hutool.http.HttpException;
|
||||
@@ -32,7 +31,6 @@ import java.nio.charset.Charset;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
* Http响应类<br>
|
||||
|
@@ -47,6 +47,7 @@ public class DownloadTest {
|
||||
Console.log("ok");
|
||||
}
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
@Test
|
||||
@Disabled
|
||||
public void downloadSizeTest() {
|
||||
@@ -123,9 +124,9 @@ public class DownloadTest {
|
||||
Assertions.assertTrue(file.exists());
|
||||
Assertions.assertTrue(file.isFile());
|
||||
Assertions.assertTrue(file.length() > 0);
|
||||
Assertions.assertTrue(file.getName().length() > 0);
|
||||
Assertions.assertFalse(file.getName().isEmpty());
|
||||
} catch (final Exception e) {
|
||||
Assertions.assertTrue(e instanceof IORuntimeException);
|
||||
Assertions.assertInstanceOf(IORuntimeException.class, e);
|
||||
} finally {
|
||||
FileUtil.del(file);
|
||||
}
|
||||
@@ -157,7 +158,7 @@ public class DownloadTest {
|
||||
Assertions.assertTrue(file.exists());
|
||||
Assertions.assertTrue(file.isFile());
|
||||
Assertions.assertTrue(file.length() > 0);
|
||||
Assertions.assertTrue(file.getName().length() > 0);
|
||||
Assertions.assertFalse(file.getName().isEmpty());
|
||||
} finally {
|
||||
FileUtil.del(file);
|
||||
}
|
||||
@@ -174,9 +175,9 @@ public class DownloadTest {
|
||||
Assertions.assertTrue(file.exists());
|
||||
Assertions.assertTrue(file.isFile());
|
||||
Assertions.assertTrue(file.length() > 0);
|
||||
Assertions.assertTrue(file.getName().length() > 0);
|
||||
Assertions.assertFalse(file.getName().isEmpty());
|
||||
} catch (final Exception e) {
|
||||
Assertions.assertTrue(e instanceof IORuntimeException);
|
||||
Assertions.assertInstanceOf(IORuntimeException.class, e);
|
||||
} finally {
|
||||
FileUtil.del(file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user