-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 449-smooth-transition-between-media-source
- Loading branch information
Showing
18 changed files
with
1,664 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: Gradle Wrapper validation | ||
|
||
on: | ||
merge_group: | ||
push: | ||
branches: | ||
- main | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
66 changes: 66 additions & 0 deletions
66
...ss/src/test/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/VectorTest.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,66 @@ | ||
/* | ||
* Copyright (c) SRG SSR. All rights reserved. | ||
* License information is available from the LICENSE file. | ||
*/ | ||
package ch.srgssr.pillarbox.core.business.integrationlayer.service | ||
|
||
import android.content.Context | ||
import androidx.test.core.app.ApplicationProvider | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import ch.srgssr.pillarbox.core.business.integrationlayer.service.Vector.getVector | ||
import org.junit.runner.RunWith | ||
import org.robolectric.annotation.Config | ||
import kotlin.test.BeforeTest | ||
import kotlin.test.Test | ||
import kotlin.test.assertEquals | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class VectorTest { | ||
private lateinit var context: Context | ||
|
||
@BeforeTest | ||
fun setup() { | ||
context = ApplicationProvider.getApplicationContext() | ||
} | ||
|
||
@Test | ||
fun getVector() { | ||
assertEquals(Vector.MOBILE, context.getVector()) | ||
} | ||
|
||
@Test | ||
@Config(qualifiers = "appliance") | ||
fun `getVector appliance`() { | ||
assertEquals(Vector.MOBILE, context.getVector()) | ||
} | ||
|
||
@Test | ||
@Config(qualifiers = "car") | ||
fun `getVector car`() { | ||
assertEquals(Vector.MOBILE, context.getVector()) | ||
} | ||
|
||
@Test | ||
@Config(qualifiers = "desk") | ||
fun `getVector desk`() { | ||
assertEquals(Vector.MOBILE, context.getVector()) | ||
} | ||
|
||
@Test | ||
@Config(qualifiers = "television") | ||
fun `getVector television`() { | ||
assertEquals(Vector.TV, context.getVector()) | ||
} | ||
|
||
@Test | ||
@Config(qualifiers = "vrheadset") | ||
fun `getVector vrheadset`() { | ||
assertEquals(Vector.MOBILE, context.getVector()) | ||
} | ||
|
||
@Test | ||
@Config(qualifiers = "watch") | ||
fun `getVector watch`() { | ||
assertEquals(Vector.MOBILE, context.getVector()) | ||
} | ||
} |
Oops, something went wrong.