Browse Source

Don't throw exception in some tests as there's no reason to

Guy Carmeli 6 years ago
parent
commit
755ff262f9

+ 4
- 4
lib/android/app/src/test/java/com/reactnativenavigation/react/NavigationReactNativeHostTest.java View File

@@ -15,24 +15,24 @@ import static org.mockito.Mockito.*;
15 15
 public class NavigationReactNativeHostTest extends BaseTest {
16 16
 
17 17
     @Test
18
-    public void getPackagesDefaults() throws Exception {
18
+    public void getPackagesDefaults() {
19 19
         NavigationReactNativeHost uut = new NavigationReactNativeHost(RuntimeEnvironment.application, false, null);
20 20
         assertThat(uut.getPackages()).hasSize(2).extracting("class").containsOnly(MainReactPackage.class, NavigationPackage.class);
21 21
     }
22 22
 
23 23
     @Test
24
-    public void getPackagesAddsAdditionalPackages() throws Exception {
24
+    public void getPackagesAddsAdditionalPackages() {
25 25
         ReactPackage myPackage = mock(ReactPackage.class);
26 26
         NavigationReactNativeHost uut = new NavigationReactNativeHost(RuntimeEnvironment.application, false, Collections.singletonList(myPackage));
27 27
         assertThat(uut.getPackages()).hasSize(3).containsOnlyOnce(myPackage);
28 28
     }
29 29
 
30 30
     @Test
31
-    public void getPackages_DoesNotAddDefaultTwice() throws Exception {
31
+    public void getPackages_DoesNotAddDefaultTwice() {
32 32
         NavigationReactNativeHost uut = new NavigationReactNativeHost(
33 33
                 RuntimeEnvironment.application,
34 34
                 false,
35
-                Arrays.<ReactPackage>asList(
35
+                Arrays.asList(
36 36
                         new MainReactPackage(),
37 37
                         new MainReactPackage(),
38 38
                         new MainReactPackage()));