-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds internal wrapper for Android native
ContentProgressProvider
(#…
- Loading branch information
1 parent
bb53e5d
commit 4c18648
Showing
9 changed files
with
227 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
.../kotlin/dev/flutter/packages/interactive_media_ads/ContentProgressProviderProxyApiTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
package dev.flutter.packages.interactive_media_ads | ||
|
||
import com.google.ads.interactivemedia.v3.api.player.VideoProgressUpdate | ||
import kotlin.test.Test | ||
import kotlin.test.assertEquals | ||
import kotlin.test.assertTrue | ||
import org.mockito.kotlin.mock | ||
|
||
class ContentProgressProviderProxyApiTest { | ||
@Test | ||
fun pigeon_defaultConstructor() { | ||
val api = TestProxyApiRegistrar().getPigeonApiContentProgressProvider() | ||
|
||
assertTrue( | ||
api.pigeon_defaultConstructor() | ||
is ContentProgressProviderProxyApi.ContentProgressProviderImpl) | ||
} | ||
|
||
@Test | ||
fun setContentProgress() { | ||
val api = TestProxyApiRegistrar().getPigeonApiContentProgressProvider() | ||
|
||
val instance = | ||
ContentProgressProviderProxyApi.ContentProgressProviderImpl( | ||
api as ContentProgressProviderProxyApi) | ||
val mockProgressUpdate = mock<VideoProgressUpdate>() | ||
api.setContentProgress(instance, mockProgressUpdate) | ||
|
||
assertEquals(mockProgressUpdate, instance.currentProgress) | ||
assertEquals(mockProgressUpdate, instance.contentProgress) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters