use of com.taobao.weex.dom.TestDomObject in project incubator-weex by apache.
the class DefaultDragHelperTest method onDragStart.
@Test
public void onDragStart() throws Exception {
WXComponent c = new WXCell(WXSDKInstanceTest.createInstance(), new TestDomObject(), null, false);
mFakeDragHelper.onDragStart(c, 3);
verify(mockedEventTrigger).triggerEvent(eq("dragstart"), anyMap());
}
use of com.taobao.weex.dom.TestDomObject in project incubator-weex by apache.
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 incubator-weex by apache.
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 WXSliderTest 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);
}
Aggregations