File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
app/src/test/java/com/d4rk/androidtutorials/java/ads/managers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,11 @@ public class AppOpenAdManagerTest {
3737
3838 private Class <?> managerClass ;
3939 private Object manager ;
40+ private Application application ;
4041
4142 @ Before
4243 public void setUp () throws Exception {
43- Application application = mock (Application .class );
44+ application = mock (Application .class );
4445 when (application .getApplicationContext ()).thenReturn (application );
4546
4647 managerClass = findManagerClass ();
@@ -101,7 +102,7 @@ public void showAdIfAvailable_withoutAd_loadsNewAd() throws Exception {
101102
102103 invokeShowAdIfAvailable (activity , listener );
103104
104- adUtils .verify (() -> AdUtils .initialize (any ( Context . class ) ));
105+ adUtils .verify (() -> AdUtils .initialize (application ));
105106 appOpenAdStatic .verify (() -> com .google .android .gms .ads .appopen .AppOpenAd .load (
106107 any (Context .class ),
107108 anyString (),
You can’t perform that action at this time.
0 commit comments