소스 검색

Add five tabs

Guy Carmeli 8 년 전
부모
커밋
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
     @Test (expected = TooManyTabsException.class)
68
     @Test (expected = TooManyTabsException.class)
69
     public void throwsExceptionWhenMoreThenFiveTabs() throws Exception {
69
     public void throwsExceptionWhenMoreThenFiveTabs() throws Exception {
70
         BottomTabsContainer bottomTabsContainer = createBottomTabsContainer();
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
             View content = new View(activity);
81
             View content = new View(activity);
73
             bottomTabsContainer.addTabContent("#" + i, content);
82
             bottomTabsContainer.addTabContent("#" + i, content);
74
         }
83
         }