forked from fanruan/design
Browse Source
Merge in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0 * commit '6b70b8a239602313b1e0bb5230d9fe0e51292694': REPORT-39601 在单元格中插入 富文本。 字体设置为14的时候,自动给我变成13了feature/big-screen
kerry
4 years ago
2 changed files with 72 additions and 2 deletions
@ -0,0 +1,69 @@
|
||||
package com.fr.design.cell.editor; |
||||
|
||||
import com.fr.invoke.Reflect; |
||||
import org.easymock.EasyMock; |
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-09-21 |
||||
*/ |
||||
public class RichTextToolBarTest { |
||||
@Test |
||||
public void testScaleUpAndDown() { |
||||
RichTextToolBar textToolBar = EasyMock.mock(RichTextToolBar.class); |
||||
|
||||
int result = Reflect.on(textToolBar).call("scaleUp", 10).get(); |
||||
Assert.assertEquals(13, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 13).get(); |
||||
Assert.assertEquals(10, result); |
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 11).get(); |
||||
Assert.assertEquals(15, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 15).get(); |
||||
Assert.assertEquals(11, result); |
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 12).get(); |
||||
Assert.assertEquals(16, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 16).get(); |
||||
Assert.assertEquals(12, result); |
||||
|
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 13).get(); |
||||
Assert.assertEquals(17, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 17).get(); |
||||
Assert.assertEquals(13, result); |
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 14).get(); |
||||
Assert.assertEquals(19, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 19).get(); |
||||
Assert.assertEquals(14, result); |
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 16).get(); |
||||
Assert.assertEquals(21, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 21).get(); |
||||
Assert.assertEquals(16, result); |
||||
|
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 17).get(); |
||||
Assert.assertEquals(23, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 23).get(); |
||||
Assert.assertEquals(17, result); |
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 17).get(); |
||||
Assert.assertEquals(23, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 23).get(); |
||||
Assert.assertEquals(17, result); |
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 19).get(); |
||||
Assert.assertEquals(25, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 25).get(); |
||||
Assert.assertEquals(19, result); |
||||
|
||||
result = Reflect.on(textToolBar).call("scaleUp", 20).get(); |
||||
Assert.assertEquals(27, result); |
||||
result = Reflect.on(textToolBar).call("scaleDown", 27).get(); |
||||
Assert.assertEquals(20, result); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue