ソースを参照

Add five tabs

Guy Carmeli 7 年 前
コミット
def68c167a
共有1 個のファイルを変更した10 個の追加1 個の削除を含む
  1. 10
    1
      android/app/src/test/java/com/reactnativenavigation/BottomTabsContainerTest.java

+ 10
- 1
android/app/src/test/java/com/reactnativenavigation/BottomTabsContainerTest.java ファイルの表示

@@ -68,7 +68,16 @@ public class BottomTabsContainerTest {
68 68
     @Test (expected = TooManyTabsException.class)
69 69
     public void throwsExceptionWhenMoreThenFiveTabs() throws Exception {
70 70
         BottomTabsContainer bottomTabsContainer = createBottomTabsContainer();
71
-        for (int i = 0; i <= 6; i++) {
71
+        for (int i = 0; i < 6; i++) {
72
+            View content = new View(activity);
73
+            bottomTabsContainer.addTabContent("#" + i, content);
74
+        }
75
+    }
76
+
77
+    @Test
78
+    public void addFiveTabs() throws Exception {
79
+        BottomTabsContainer bottomTabsContainer = createBottomTabsContainer();
80
+        for (int i = 0; i < 5; i++) {
72 81
             View content = new View(activity);
73 82
             bottomTabsContainer.addTabContent("#" + i, content);
74 83
         }