|
|
@ -9,14 +9,31 @@ 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.WTitleLayout; |
|
|
|
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import com.fr.json.JSONObject; |
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.Rectangle; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Created by kerry on 2020-05-08 |
|
|
|
* Created by kerry on 2020-05-08 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class ComponentCreateOperateTest { |
|
|
|
public class ComponentCreateOperateTest { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testConstructor(){ |
|
|
|
|
|
|
|
ElementCaseEditor caseEditor = new ElementCaseEditor(); |
|
|
|
|
|
|
|
caseEditor.setWidgetName("report0"); |
|
|
|
|
|
|
|
caseEditor.setWidgetID("xxxx0"); |
|
|
|
|
|
|
|
WTitleLayout wTitleLayout = new WTitleLayout(); |
|
|
|
|
|
|
|
wTitleLayout.addBody(caseEditor, new Rectangle()); |
|
|
|
|
|
|
|
ComponentOperate componentOperate0 = new ComponentCreateOperate(caseEditor); |
|
|
|
|
|
|
|
ComponentOperate componentOperate1 = new ComponentCreateOperate(wTitleLayout); |
|
|
|
|
|
|
|
ComparatorUtils.equals(componentOperate0.toJSONObject(), componentOperate1.toJSONObject()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testToJSONObject() { |
|
|
|
public void testToJSONObject() { |
|
|
|
Widget button = new FreeButton(); |
|
|
|
Widget button = new FreeButton(); |
|
|
|