Skip to content

Commit

Permalink
* [android] fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
sospartan committed Jun 16, 2016
1 parent 8645a82 commit 4dda4ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public void setUp() throws Exception {
Mockito.when(divDom.clone()).thenReturn(divDom);
divDom.ref = "1";

mWXDiv = new WXDiv(instance, divDom, null, "1", false);
mWXDiv = new WXDiv(instance, divDom, null, false);
mWXDiv.initView();
}

Expand All @@ -252,7 +252,7 @@ public void testAddChild(){
Mockito.when(testDom.getPadding()).thenReturn(new Spacing());
Mockito.when(testDom.clone()).thenReturn(testDom);
testDom.ref = "2";
WXText child1 = new WXText(instance, testDom, mWXDiv, "1", false);
WXText child1 = new WXText(instance, testDom, mWXDiv, false);
child1.initView();

mWXDiv.addChild(child1, 0);
Expand All @@ -263,7 +263,7 @@ public void testAddChild(){
Mockito.when(testDom2.getPadding()).thenReturn(new Spacing());
Mockito.when(testDom2.clone()).thenReturn(testDom2);
testDom2.ref = "3";
child2 = new WXText(instance, testDom2, mWXDiv, "1", false);
child2 = new WXText(instance, testDom2, mWXDiv, false);
child2.initView();

mWXDiv.addChild(child2, -1);
Expand All @@ -275,7 +275,7 @@ public void testAddChild(){
Mockito.when(testDom3.getPadding()).thenReturn(new Spacing());
Mockito.when(testDom3.clone()).thenReturn(testDom3);
testDom3.ref = "4";
WXText child3 = new WXText(instance, testDom3, mWXDiv, "1", false);
WXText child3 = new WXText(instance, testDom3, mWXDiv, false);
child3.initView();

mWXDiv.addChild(child3, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ public void setUp() throws Exception {
Mockito.when(mDomObject.getLayoutWidth()).thenReturn(100f);
Mockito.when(mDomObject.getLayoutHeight()).thenReturn(100f);

mParent = new WXDiv(instance, mParentDomObj, null, "1", false);
mParent = new WXDiv(instance, mParentDomObj, null, false);
mParent.createView(null, -1);
mWXText = new WXText(instance, mDomObject, mParent, "1", false);
mWXText = new WXText(instance, mDomObject, mParent, false);
mWXText.setHolder(new ComponentHolder(WXText.class));
assertNotNull(instance.getContext());
}
Expand Down

0 comments on commit 4dda4ac

Please sign in to comment.