forked from fanruan/design
Browse Source
* commit '10e88ac516e292fdaaf5465dd8d53b4744d04e38': REPORT-13902 错误的test依赖, 先移出来.bugfix/10.0
neil
6 years ago
1 changed files with 29 additions and 0 deletions
@ -0,0 +1,29 @@
|
||||
package com.fr.form.ui; |
||||
|
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.designer.creator.XCreatorUtils; |
||||
import com.fr.design.mainframe.FormSelectionUtils; |
||||
import com.fr.form.main.Form; |
||||
import com.fr.general.ComparatorUtils; |
||||
import junit.framework.TestCase; |
||||
|
||||
import java.awt.Dimension; |
||||
|
||||
/** |
||||
* @author kerry |
||||
* @date 2018/7/27 |
||||
*/ |
||||
public class WidgetNameCopyTest extends TestCase { |
||||
|
||||
public void testWidgetNameCopy() throws Exception { |
||||
Widget button = new FreeButton(); |
||||
Form form = new Form(); |
||||
button.setWidgetName("button0"); |
||||
XCreator xCreator = XCreatorUtils.createXCreator(button, new Dimension(100, 100)); |
||||
XCreator copyXcreator1 = FormSelectionUtils.copyXcreator(form, xCreator); |
||||
XCreator copyXcreator2 = FormSelectionUtils.copyXcreator(form, xCreator); |
||||
copyXcreator1.toData().setWidgetName("button_test"); |
||||
assertTrue(!ComparatorUtils.equals(copyXcreator2.toData().getWidgetName(), copyXcreator1.toData().getWidgetName())); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue