forked from fanruan/finekit
Mars.Ma
5 years ago
4 changed files with 42 additions and 5 deletions
@ -1,4 +0,0 @@
|
||||
package com.fanruan.api.base; |
||||
|
||||
public abstract class BaseFormula extends com.fr.base.BaseFormula { |
||||
} |
@ -0,0 +1,22 @@
|
||||
package com.fanruan.api.util; |
||||
|
||||
import com.fr.base.Style; |
||||
import com.fr.plugin.present.fun.StarPainter; |
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
import java.awt.*; |
||||
|
||||
import static org.junit.Assert.*; |
||||
|
||||
public class CellKitTest { |
||||
|
||||
@Test |
||||
public void value2Image() { |
||||
StarPainter star = new StarPainter(1); |
||||
Style style = Style.getInstance(); |
||||
Image image = CellKit.value2Image(star, 1, style, 30, 50); |
||||
Assert.assertEquals(30, image.getWidth(null)); |
||||
Assert.assertEquals(50, image.getHeight(null)); |
||||
} |
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.fanruan.api.util; |
||||
|
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
import static org.junit.Assert.*; |
||||
|
||||
public class StableKitTest { |
||||
|
||||
@Test |
||||
public void canBeFormula() { |
||||
String s1 = "=1"; |
||||
String s2 = "=a+b+"; |
||||
String s3 = "ppp"; |
||||
Assert.assertTrue(StableKit.canBeFormula(s1)); |
||||
Assert.assertTrue(StableKit.canBeFormula(s2)); |
||||
Assert.assertFalse(StableKit.canBeFormula(s3)); |
||||
} |
||||
} |
Loading…
Reference in new issue