This commit is contained in:
Looly
2023-12-29 20:55:55 +08:00
parent 91178e45a8
commit 6facfcfc4d
101 changed files with 271 additions and 307 deletions

View File

@@ -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>

View File

@@ -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);
}