mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
优化QrCodeUtil测试代码
This commit is contained in:
parent
87319eb73f
commit
9543012fec
@ -122,11 +122,14 @@ public class QrCodeUtilTest {
|
||||
@Test
|
||||
public void generateSvgTest() {
|
||||
QrConfig qrConfig = QrConfig.create().setImg("d:/test/logo.png")
|
||||
.setForeColor(Color.GREEN)
|
||||
.setForeColor(Color.blue)
|
||||
.setBackColor(Color.pink)
|
||||
.setRatio(8)
|
||||
.setErrorCorrection(ErrorCorrectionLevel.M)
|
||||
.setMargin(1);
|
||||
String svg = QrCodeUtil.generateAsSvg("https://hutool.cn/", qrConfig);
|
||||
Assert.assertNotNull(svg);
|
||||
FileUtil.writeString(svg, FileUtil.touch("d:/test/hutool_qr.svg"),StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user