Browse Source
Merge in DESIGN/design from final/10.0 to persist/10.0 * commit 'e6dfe50930ccbb1e1ce8f4eb063877b321c8d32d': 代码修改 代码修改 REPORT-40553 决策报表-连续点击空白设计面板,body没有处于未选中状态 MOBILE-29339 两个横向布局块中间无法插入新报表块 REPORT-34955 linux设计器选中某个字体后 切换单元格后字体未重新设置未默认字体 代码修改 提到final REPORT-39601 在单元格中插入 富文本。 字体设置为14的时候,自动给我变成13了persist/10.0 10.0.9.2020.09.27
Kara
4 years ago
5 changed files with 112 additions and 8 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