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 {
37
37
38
38
private Class <?> managerClass ;
39
39
private Object manager ;
40
+ private Application application ;
40
41
41
42
@ Before
42
43
public void setUp () throws Exception {
43
- Application application = mock (Application .class );
44
+ application = mock (Application .class );
44
45
when (application .getApplicationContext ()).thenReturn (application );
45
46
46
47
managerClass = findManagerClass ();
@@ -101,7 +102,7 @@ public void showAdIfAvailable_withoutAd_loadsNewAd() throws Exception {
101
102
102
103
invokeShowAdIfAvailable (activity , listener );
103
104
104
- adUtils .verify (() -> AdUtils .initialize (any ( Context . class ) ));
105
+ adUtils .verify (() -> AdUtils .initialize (application ));
105
106
appOpenAdStatic .verify (() -> com .google .android .gms .ads .appopen .AppOpenAd .load (
106
107
any (Context .class ),
107
108
anyString (),
You can’t perform that action at this time.
0 commit comments