Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fb984bf
First build.gradle update
LTPhantom May 12, 2026
e53d2aa
Updated classes in the main src folder
LTPhantom May 12, 2026
c2062cf
Split play services Classes
LTPhantom May 13, 2026
237cd4a
Duplicated classes to use in adsMobileSdk
LTPhantom May 13, 2026
bd2e9fa
Initial NextGen implementation
LTPhantom May 13, 2026
1b1b1eb
NextGen usage fixes
LTPhantom May 14, 2026
5293aff
Native Ads fix
LTPhantom May 14, 2026
fcf11b7
Update License year in new files of NextGen SDK
LTPhantom May 20, 2026
318fda4
Updated License in playservices files
LTPhantom May 20, 2026
2273113
Fixed Android tests
LTPhantom May 20, 2026
27cb6d0
Fixed iOS tests
LTPhantom May 20, 2026
3ca5330
Fixed samples
LTPhantom May 21, 2026
919e138
Cleaned mediation sample
LTPhantom May 21, 2026
98c997e
Updated src folder name to useNextGenSdk
LTPhantom May 22, 2026
c40a2ff
Fixed Info.plist
LTPhantom May 22, 2026
02231b2
Fixed Runner.scheme
LTPhantom May 22, 2026
a4f6b22
Better map disableMediationAdapterInitialization method
LTPhantom May 25, 2026
99d7167
Added Result call to MethodCalls for AppStateNotifier
LTPhantom May 28, 2026
5d4ec32
Updated classes in the main src folder
LTPhantom May 12, 2026
21ed6d1
Duplicated classes to use in adsMobileSdk
LTPhantom May 13, 2026
71dd7dc
Initial NextGen implementation
LTPhantom May 13, 2026
a1397ad
NextGen usage fixes
LTPhantom May 14, 2026
c497f48
Native Ads fix
LTPhantom May 14, 2026
faaa3b4
Update License year in new files of NextGen SDK
LTPhantom May 20, 2026
1afdab7
Updated License in playservices files
LTPhantom May 20, 2026
1aa485e
Updated src folder name to useNextGenSdk
LTPhantom May 22, 2026
c774ed8
Added Result call to MethodCalls for AppStateNotifier
LTPhantom May 28, 2026
b9ab387
Merge remote-tracking branch 'refs/remotes/origin/nextGenAndroid' int…
LTPhantom May 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
switch (call.method) {
case "start":
start();
result.success(null);
break;
case "stop":
stop();
result.success(null);
break;
default:
result.notImplemented();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package io.flutter.plugins.googlemobileads;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.spy;

import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel.Result;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;

/** Tests for {@link AppStateNotifier}. */
@RunWith(RobolectricTestRunner.class)
public class AppStateNotifierTest {

private AppStateNotifier appStateNotifier;
private BinaryMessenger mockBinaryMessenger;

@Before
public void setup() {
mockBinaryMessenger = mock(BinaryMessenger.class);
appStateNotifier = spy(new AppStateNotifier(mockBinaryMessenger));
}

@Test
public void onMethodCall_start() {
MethodCall call = new MethodCall("start", null);
Result mockResult = mock(Result.class);

appStateNotifier.onMethodCall(call, mockResult);

verify(appStateNotifier).start();
verify(mockResult).success(null);
}

@Test
public void onMethodCall_stop() {
MethodCall call = new MethodCall("stop", null);
Result mockResult = mock(Result.class);

appStateNotifier.onMethodCall(call, mockResult);

verify(appStateNotifier).stop();
verify(mockResult).success(null);
}

@Test
public void onMethodCall_unknownMethod() {
MethodCall call = new MethodCall("unknown", null);
Result mockResult = mock(Result.class);

appStateNotifier.onMethodCall(call, mockResult);

verify(mockResult).notImplemented();
}
}
Loading