From 7d407df69653171ea619c60415c16c21b735bd85 Mon Sep 17 00:00:00 2001 From: gotty Date: Sat, 25 Jan 2020 04:06:44 +0300 Subject: [PATCH] [LIB-9] Modify ChessQRCodeWriterTest --- .../org/hedgecode/chess/qrcode/ChessQRCodeWriterTest.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/chesshog-qrcode/src/test/java/org/hedgecode/chess/qrcode/ChessQRCodeWriterTest.java b/chesshog-qrcode/src/test/java/org/hedgecode/chess/qrcode/ChessQRCodeWriterTest.java index f4a606f..2a5cebc 100644 --- a/chesshog-qrcode/src/test/java/org/hedgecode/chess/qrcode/ChessQRCodeWriterTest.java +++ b/chesshog-qrcode/src/test/java/org/hedgecode/chess/qrcode/ChessQRCodeWriterTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019. Developed by Hedgecode. + * Copyright (c) 2018-2020. Developed by Hedgecode. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ package org.hedgecode.chess.qrcode; +import java.awt.image.RenderedImage; import java.io.File; import javax.imageio.ImageIO; @@ -75,13 +76,17 @@ public class ChessQRCodeWriterTest extends Assert { System.out.println(actual); + File outFile = new File("chessboard.png"); + RenderedImage image = DiagramBuilder.getInstance().build( + actualPosition, "test", "shade" + ).getImage(); + ImageIO.write( - DiagramBuilder.getInstance().build(actualPosition, "test", "shade"), + image, "PNG", - new File("chessboard.png") + outFile ); - System.out.println( Builders.ASCII.builder().build(actualPosition) ); -- 2.10.0