From: gotty Date: Sat, 25 Jan 2020 01:06:44 +0000 (+0300) Subject: [LIB-9] Modify ChessQRCodeWriterTest X-Git-Url: https://git.hedgecode.org/?a=commitdiff_plain;p=chesshog.git [LIB-9] Modify ChessQRCodeWriterTest --- 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) );