Browse Source

Merge pull request #25 in TC/finekit from ~MARS.MA/finekit:master to master

* commit 'dc8b62d5bc238895536c586cb33e5d52c40b419f':
  KERNEL-1197 修改一个单元测试。
master
superman 5 years ago
parent
commit
fa0af84770
  1. 6
      src/test/java/com/fanruan/api/util/PaintKitTest.java

6
src/test/java/com/fanruan/api/util/PaintKitTest.java

@ -2,19 +2,19 @@ package com.fanruan.api.util;
import com.fanruan.api.report.PaintKit; import com.fanruan.api.report.PaintKit;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.plugin.present.fun.StarPainter;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import java.awt.*; import java.awt.*;
import java.awt.image.BufferedImage;
public class PaintKitTest { public class PaintKitTest {
@Test @Test
public void value2Image() { public void value2Image() {
StarPainter star = new StarPainter(1); BufferedImage bi = new BufferedImage(40, 50, BufferedImage.TYPE_BYTE_GRAY);
Style style = Style.getInstance(); Style style = Style.getInstance();
Image image = PaintKit.value2Image(star, 1, style, 30, 50); Image image = PaintKit.value2Image(bi, 1, style, 30, 50);
Assert.assertEquals(30, image.getWidth(null)); Assert.assertEquals(30, image.getWidth(null));
Assert.assertEquals(50, image.getHeight(null)); Assert.assertEquals(50, image.getHeight(null));
} }

Loading…
Cancel
Save