use of com.taobao.weex.dom.TestDomObject in project weex-example by KalicyZhou.
the class WXAnimationModuleTest method testStartAnimation.
@Test
public void testStartAnimation() throws Exception {
module.startAnimation(module.mWXSDKInstance, null, null, null);
TestComponent comp = new TestComponent(module.mWXSDKInstance, new TestDomObject(), null);
module.startAnimation(module.mWXSDKInstance, comp, null, null);
WXAnimationBean animation = new WXAnimationBean();
module.startAnimation(module.mWXSDKInstance, comp, animation, null);
animation.styles = new WXAnimationBean.Style();
module.startAnimation(module.mWXSDKInstance, comp, animation, null);
}
use of com.taobao.weex.dom.TestDomObject in project weex-example by KalicyZhou.
the class ComponentTest method create.
public static void create(WXComponent comp, View view) {
TestDomObject domObject = new TestDomObject();
WXVContainer parent;
if ((parent = comp.getParent()) != null) {
if (view != null) {
comp.mHost = view;
} else {
comp.createView();
}
} else {
parent = WXDivTest.create();
parent.addChild(comp);
parent.createChildViewAt(-1);
}
comp.setLayout(domObject);
domObject = new TestDomObject();
comp.updateDom(domObject);
comp.applyLayoutAndEvent(comp);
addEvent(comp);
}
use of com.taobao.weex.dom.TestDomObject in project weex-example by KalicyZhou.
the class WXSliderNeighborTest method testPages.
@Test
public void testPages() throws Exception {
component = create();
component.addChild(ComponentTest.createComponent(new TestDomObject(), component, TestComponent.class));
component.addChild(ComponentTest.createComponent(new TestDomObject(), component, TestComponent.class));
component.addChild(ComponentTest.createComponent(new TestDomObject(), component, TestComponent.class));
component.addChild(ComponentTest.createComponent(new TestDomObject(), component, TestComponent.class));
component.addChild(ComponentTest.createComponent(new TestDomObject(), component, TestComponent.class));
WXIndicator indicator = new WXIndicator(component.getInstance(), new TestDomObject(), component, false);
ComponentTest.create(indicator);
component.addChild(indicator);
ComponentTest.create(component);
assertEquals(5, component.mViewPager.getCirclePageAdapter().getRealCount());
assertEquals(6, component.getChildCount());
component.mViewPager.setCurrentItem(0);
}
use of com.taobao.weex.dom.TestDomObject in project weex-example by KalicyZhou.
the class WXSliderNeighborTest method testZoomTransformer.
@Test
public void testZoomTransformer() throws Exception {
component = create();
TestComponent page = ComponentTest.createComponent(new TestDomObject(), component, TestComponent.class);
TestComponent pageChild = ComponentTest.createComponent(new TestDomObject(), component, TestComponent.class);
page.addChild(pageChild);
component.addChild(page);
ComponentTest.create(component);
// ComponentTest.create(pageChild);
// ComponentTest.create(page);
WXSliderNeighbor.ZoomTransformer transformer = component.createTransformer();
transformer.transformPage(page.getHostView(), 0.2f);
}
use of com.taobao.weex.dom.TestDomObject in project incubator-weex by apache.
the class DefaultDragHelperTest method onDragEnd.
@Test
public void onDragEnd() throws Exception {
WXComponent c = new WXCell(WXSDKInstanceTest.createInstance(), new TestDomObject(), null, false);
mFakeDragHelper.onDragEnd(c, 1, 2);
verify(mockedEventTrigger).triggerEvent(eq("dragend"), anyMap());
}
Aggregations