Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Aug 2, 2023
2 parents 10db188 + c4be342 commit 5e66482
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

name: Publish package to GitHub Packages
on:
release:
types: [created]
push:
branches:
- 'main'
jobs:
publish:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ android {
minSdk 29
targetSdk 32
versionCode 1
versionName "1.0.0"
versionName "1.0.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -38,7 +38,7 @@ publishing {
release(MavenPublication) {
groupId = 'com.fivegmag'
artifactId = 'a5gmscommonlibrary'
version = '1.0.0'
version = '1.0.1'

afterEvaluate {
from components.release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,9 @@ object SessionHandlerEvents {
object ContentTypes {
const val DASH = "application/dash+xml"
const val HLS = "application/vnd.apple.mpegurl"
}

object UserAgentTokens {
const val FIVE_G_MS_REL_17_MEDIA_STREAM_HANDLER = "5GMSMediaStreamHandler/17"
const val FIVE_G_MS_REL_17_MEDIA_SESSION_HANDLER = "5GMSMediaSessionHandler/17"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.fivegmag.a5gmscommonlibrary

import com.fivegmag.a5gmscommonlibrary.models.EntryPoint
import com.fivegmag.a5gmscommonlibrary.models.M8Model
import com.fivegmag.a5gmscommonlibrary.models.ServiceListEntry
import org.junit.Test

import org.junit.Assert.*

class M8ModelUnitTest {

@Test
fun createModel() {
var profiles = ArrayList<String>()
profiles.add("profile1");

var firstEntryPoint = EntryPoint("locator1", "contentType1", profiles)
var firstEntryPointList = ArrayList<EntryPoint>()
firstEntryPointList.add(firstEntryPoint)

var secondEntryPoint = EntryPoint("locator2", "contentType2", profiles)
var secondEntryPointList = ArrayList<EntryPoint>()
secondEntryPointList.add(secondEntryPoint)

var firstServiceListEntry = ServiceListEntry("id1", "name1", firstEntryPointList)
var secondServiceListEntry = ServiceListEntry("id2", "name2", secondEntryPointList)
var serviceList = ArrayList<ServiceListEntry>()
serviceList.add(firstServiceListEntry)
serviceList.add(secondServiceListEntry)

var m5BaseUrl = "m5BaseUrl"
var m8Model = M8Model(m5BaseUrl, serviceList)

assertEquals(m5BaseUrl, m8Model.m5BaseUrl)
assertEquals("id1", m8Model.serviceList.get(0).provisioningSessionId)
assertEquals("id2", m8Model.serviceList.get(1).provisioningSessionId)
assertEquals("name1", m8Model.serviceList.get(0).name)
assertEquals("name2", m8Model.serviceList.get(1).name)
assertEquals("locator1", m8Model.serviceList.get(0).entryPoints?.get(0)?.locator ?: "fail")
assertEquals("contentType1", m8Model.serviceList.get(0).entryPoints?.get(0)?.contentType ?: "fail")
assertEquals("locator2", m8Model.serviceList.get(1).entryPoints?.get(0)?.locator ?: "fail")
assertEquals("contentType2", m8Model.serviceList.get(1).entryPoints?.get(0)?.contentType ?: "fail")
}
}

0 comments on commit 5e66482

Please sign in to comment.