|
|
@ -5,11 +5,15 @@ import com.fr.form.ui.CardSwitchButton; |
|
|
|
import com.fr.form.ui.ChartEditor; |
|
|
|
import com.fr.form.ui.ChartEditor; |
|
|
|
import com.fr.form.ui.ElementCaseEditor; |
|
|
|
import com.fr.form.ui.ElementCaseEditor; |
|
|
|
import com.fr.form.ui.FreeButton; |
|
|
|
import com.fr.form.ui.FreeButton; |
|
|
|
|
|
|
|
import com.fr.form.ui.TextEditor; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.Widget; |
|
|
|
import com.fr.form.ui.container.WAbsoluteBodyLayout; |
|
|
|
import com.fr.form.ui.container.WAbsoluteBodyLayout; |
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout; |
|
|
|
import com.fr.form.ui.container.WAbsoluteLayout; |
|
|
|
import com.fr.form.ui.container.WCardLayout; |
|
|
|
import com.fr.form.ui.container.WCardLayout; |
|
|
|
|
|
|
|
import com.fr.form.ui.container.WScaleLayout; |
|
|
|
import com.fr.form.ui.container.WTitleLayout; |
|
|
|
import com.fr.form.ui.container.WTitleLayout; |
|
|
|
|
|
|
|
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; |
|
|
|
|
|
|
|
import com.fr.form.ui.widget.CRBoundsWidget; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.Assert; |
|
|
@ -23,7 +27,7 @@ import java.awt.Rectangle; |
|
|
|
public class ComponentCreateOperateTest { |
|
|
|
public class ComponentCreateOperateTest { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testConstructor(){ |
|
|
|
public void testConstructor() { |
|
|
|
ElementCaseEditor caseEditor = new ElementCaseEditor(); |
|
|
|
ElementCaseEditor caseEditor = new ElementCaseEditor(); |
|
|
|
caseEditor.setWidgetName("report0"); |
|
|
|
caseEditor.setWidgetName("report0"); |
|
|
|
caseEditor.setWidgetID("xxxx0"); |
|
|
|
caseEditor.setWidgetID("xxxx0"); |
|
|
@ -32,6 +36,22 @@ public class ComponentCreateOperateTest { |
|
|
|
ComponentOperate componentOperate0 = new ComponentCreateOperate(caseEditor); |
|
|
|
ComponentOperate componentOperate0 = new ComponentCreateOperate(caseEditor); |
|
|
|
ComponentOperate componentOperate1 = new ComponentCreateOperate(wTitleLayout); |
|
|
|
ComponentOperate componentOperate1 = new ComponentCreateOperate(wTitleLayout); |
|
|
|
ComparatorUtils.equals(componentOperate0.toJSONObject(), componentOperate1.toJSONObject()); |
|
|
|
ComparatorUtils.equals(componentOperate0.toJSONObject(), componentOperate1.toJSONObject()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WScaleLayout scaleLayout = new WScaleLayout(); |
|
|
|
|
|
|
|
TextEditor textEditor = new TextEditor(); |
|
|
|
|
|
|
|
scaleLayout.addWidget(new CRBoundsWidget(textEditor, new Rectangle())); |
|
|
|
|
|
|
|
ComponentOperate componentOperate3 = new ComponentCreateOperate(scaleLayout); |
|
|
|
|
|
|
|
ComponentOperate componentOperate4 = new ComponentCreateOperate(textEditor); |
|
|
|
|
|
|
|
ComparatorUtils.equals(componentOperate3.toJSONObject(), componentOperate4.toJSONObject()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WCardMainBorderLayout wCardMainBorderLayout = new WCardMainBorderLayout(); |
|
|
|
|
|
|
|
WCardLayout wCardLayout = new WCardLayout(); |
|
|
|
|
|
|
|
wCardMainBorderLayout.addCenter(wCardLayout); |
|
|
|
|
|
|
|
ComponentOperate componentOperate5 = new ComponentCreateOperate(wCardMainBorderLayout); |
|
|
|
|
|
|
|
ComponentOperate componentOperate6 = new ComponentCreateOperate(wCardLayout); |
|
|
|
|
|
|
|
ComparatorUtils.equals(componentOperate5.toJSONObject(), componentOperate6.toJSONObject()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|