public class AudioEffectTests : TestBase
{
private AudioEffect _audioEffect;
+ private AudioOffload _audioOffload;
+
+ private void SetAudioOffload()
+ {
+ try
+ {
+ _audioOffload = GetIdlePlayer().AudioOffload;
+ _audioOffload.IsEnabled = true;
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.AudioOffload) == false)
+ {
+ Assert.Pass($"The feature({Features.AudioOffload} is not supported.");
+ }
+ }
+ }
[SetUp]
public void SetUp()
Assert.That(_audioEffect.Player, Is.Not.Null);
}
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the Clear if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.AudioEffect.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void Clear_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => _audioEffect.Clear(), Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Clear throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.AudioEffect.Clear M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void Clear_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => _audioEffect.Clear(), Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the Indexer if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.AudioEffect.this[int] A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void this_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => _audioEffect[0], Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Indexer throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.AudioEffect.this[int] A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void this_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => _audioEffect[0], Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Count throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.AudioEffect.Count A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void Count_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => _audioEffect.Count, Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("BandLevelRange throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.AudioEffect.BandLevelRange A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void BandLevelRange_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => _audioEffect.BandLevelRange, Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("IsAvailable throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.AudioEffect.IsAvailable A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void IsAvailable_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => _audioEffect.IsAvailable, Throws.InvalidOperationException);
+ }
+
}
}
--- /dev/null
+using NUnit.Framework;
+using System.Threading.Tasks;
+using System.Linq;
+using System.Collections;
+using System;
+
+namespace Tizen.Multimedia.Tests
+{
+ [TestFixture]
+ [Description("Tizen.Multimedia.AudioOffload tests")]
+ public class AudioOffloadTests : TestBase
+ {
+ private AudioOffload _audioOffload;
+
+ [SetUp]
+ public void SetUp()
+ {
+ try
+ {
+ _audioOffload = GetIdlePlayer().AudioOffload;
+ _audioOffload.IsEnabled = true;
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.AudioOffload) == false)
+ {
+ Assert.Pass($"The feature({Features.AudioOffload} is not supported.");
+ }
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("check whether IsEnabled has a proper default value")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.IsEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void IsEnabled_DEFAULT()
+ {
+ using (var player = new Player())
+ {
+ Assert.That(player.AudioOffload.IsEnabled, Is.EqualTo(false));
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("check whether IsEnabled is readable and writable")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.IsEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void IsEnabled_SET_GET()
+ {
+ Assert.That(_audioOffload.IsEnabled, Is.EqualTo(true));
+
+ const bool newValue = false;
+ _audioOffload.IsEnabled = newValue;
+
+ Assert.That(_audioOffload.IsEnabled, Is.EqualTo(newValue));
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("IsEnabled throw exception if the player is not in a valid state")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.IsEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public async Task IsEnabled_THROWS_IF_NOT_VALID_STATE()
+ {
+ TestPlayer.SetSource(Constants.AudioFileSource);
+ await TestPlayer.PrepareAsync();
+
+ Assert.That(() => _audioOffload.IsEnabled = false, Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the IsEnabled if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.IsEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void IsEnabled_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => _audioOffload.IsEnabled, Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check if IsActivated is readable")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.IsActivated A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PDV")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public async Task IsActivated_DEFAULT()
+ {
+ TestPlayer.SetSource(Constants.AudioFileSource);
+ await TestPlayer.PrepareAsync();
+
+ Assert.That(() => _audioOffload.IsActivated, Throws.Nothing);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("IsActivated throw exception if the player is not in a valid state")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.IsActivated A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void IsActivated_THROWS_IF_NOT_VALID_STATE()
+ {
+ Assert.That(() => _audioOffload.IsActivated, Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the IsActivated if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.IsActivated A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void IsActivated_CHECK()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => _audioOffload.IsActivated, Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test SupportedFormats supported property. Supported list should be greater than 0")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.SupportedFormats A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void SupportedFormats_PROPERTY_READ_ONLY()
+ {
+ IList result = _audioOffload.SupportedFormats.ToList();
+ Assert.IsNotNull(result, "The list of adaptive variants should not be null.");
+ Assert.IsNotEmpty(result, "The list of adaptive variants should not be empty.");
+ Assert.Greater(result.Count, 0, "The list of adaptive variants should be greater than 0");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Check if SupportedFormats is readable")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.SupportedFormats A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRO")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void SupportedFormats_CHECK()
+ {
+ Assert.That(() => _audioOffload.SupportedFormats.ToList(),
+ Throws.Nothing);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the SupportedFormats if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.AudioOffload.SupportedFormats A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void SupportedFormats_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+
+ Assert.That(() => TestPlayer.AudioOffload.SupportedFormats.ToList(),
+ Throws.TypeOf<ObjectDisposedException>());
+ }
+ }
+}
\ No newline at end of file
{
private AudioEffect _audioEffect;
private EqualizerBand _band;
+ private AudioOffload _audioOffload;
+
+ private void SetAudioOffload()
+ {
+ try
+ {
+ _audioOffload = GetIdlePlayer().AudioOffload;
+ _audioOffload.IsEnabled = true;
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.AudioOffload) == false)
+ {
+ Assert.Pass($"The feature({Features.AudioOffload} is not supported.");
+ }
+ }
+ }
[SetUp]
public void SetUp()
Assert.That(() => _band.Level, Throws.TypeOf<ObjectDisposedException>());
}
+
+ [Test]
+ [Category("P2")]
+ [Description("Frequency throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.EqualizerBand.Frequency A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void Frequency_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => _band.Frequency, Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("FrequencyRange throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.EqualizerBand.FrequencyRange A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void FrequencyRange_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => _band.FrequencyRange, Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Level throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.EqualizerBand.Level A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void Level_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => _band.Level, Throws.InvalidOperationException);
+ }
}
}
private MediaUriSource _streamingSource = null;
private bool _isInternetSupported;
private readonly AudioMediaFormat _audioFormat = new AudioMediaFormat(MediaFormatAudioMimeType.Pcm, 2, 48000, 16, 128);
+ private AudioOffload _audioOffload;
+
+ private void SetAudioOffload()
+ {
+ try
+ {
+ _audioOffload = GetIdlePlayer().AudioOffload;
+ _audioOffload.IsEnabled = true;
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.AudioOffload) == false)
+ {
+ Assert.Pass($"The feature({Features.AudioOffload} is not supported.");
+ }
+ }
+ }
[OneTimeSetUp]
public void Init()
Assert.That(() => TestPlayer.ReplayGain, Throws.TypeOf<ObjectDisposedException>());
}
+ [Test]
+ [Category("P2")]
+ [Description("ReplayGain throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.Player.ReplayGain A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void ReplayGain_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => TestPlayer.ReplayGain = true, Throws.InvalidOperationException);
+ }
#endregion
#region AudioOnly
Assert.That(() => TestPlayer.AudioLatencyMode = (AudioLatencyMode)0xFF,
Throws.ArgumentException);
}
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access AudioLatencyMode Clear if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.Player.AudioLatencyMode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void AudioLatencyMode_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.Low, Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("AudioLatencyMode throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.Player.AudioLatencyMode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void AudioLatencyMode_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.Low, Throws.InvalidOperationException);
+ Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.Mid, Throws.InvalidOperationException);
+ Assert.That(() => TestPlayer.AudioLatencyMode = AudioLatencyMode.High, Throws.InvalidOperationException);
+ }
#endregion
#region Mute
Assert.That(() => TestPlayer.SetPlaybackRate(0.1F), Throws.InvalidOperationException);
}
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access SetPlaybackRate Clear if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.Player.SetPlaybackRate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void SetPlaybackRate_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => TestPlayer.SetPlaybackRate(0.1F), Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("SetPlaybackRate throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.Player.SetPlaybackRate M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void SetPlaybackRate_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => TestPlayer.SetPlaybackRate(0.1F), Throws.InvalidOperationException);
+ }
#endregion
#region SetSource
}
[Test]
+ [Category("P2")]
+ [Description("AudioPitchEnabled throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.Player.AudioPitchEnabled A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void AudioPitchEnabled_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => TestPlayer.AudioPitchEnabled = true, Throws.InvalidOperationException);
+ }
+
+ [Test]
[Category("P1")]
[Description("AudioPitch check default value")]
[Property("SPEC", "Tizen.Multimedia.Player.AudioPitch A")]
GetIdlePlayer().Dispose();
Assert.That(() => TestPlayer.AudioPitch = 1.0F, Throws.TypeOf<ObjectDisposedException>());
}
+
+ [Test]
+ [Category("P2")]
+ [Description("AudioPitch throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.Player.AudioPitch A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void AudioPitch_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => TestPlayer.AudioPitch = 1.0F, Throws.InvalidOperationException);
+ }
#endregion
#region AudioFrameDecoded
}
[Test]
+ [Category("P2")]
+ [Description("EnableExportingAudioData throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.Player.EnableExportingAudioData M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void EnableExportingAudioData_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ Assert.That(() => TestPlayer.EnableExportingAudioData(_audioFormat, PlayerAudioExtractOption.NoSyncAndDeinterleave),
+ Throws.InvalidOperationException);
+ }
+
+ [Test]
[Category("P1")]
[Description("Check DisableExportingAudioData does not throw exceptions")]
[Property("SPEC", "Tizen.Multimedia.Player.DisableExportingAudioData M")]
Assert.That(() => TestPlayer.DisableExportingAudioData(), Throws.TypeOf<ObjectDisposedException>());
}
#endregion
+
+ [Test]
+ [Category("P1")]
+ [Description("AudioOffload check default value")]
+ [Property("SPEC", "Tizen.Multimedia.Player.AudioOffload A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PDV")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void AudioOffload_DEFAULT()
+ {
+ try
+ {
+ Assert.That(TestPlayer.AudioOffload, Is.Not.Null);
+ }
+ catch (NotSupportedException)
+ {
+ Assert.False(FeatureChecker.IsSupported(Features.AudioOffload), "NotSupportedException shouldn't be thrown.");
+ }
+ }
}
}
[Description("Tizen.Multimedia.PlayerTrackInfo Tests")]
public class PlayerTrackInfoTests : TestBase
{
+ private AudioOffload _audioOffload;
+
+ private void SetAudioOffload()
+ {
+ try
+ {
+ _audioOffload = GetIdlePlayer().AudioOffload;
+ _audioOffload.IsEnabled = true;
+ }
+ catch (NotSupportedException)
+ {
+ if (FeatureChecker.IsSupported(Features.AudioOffload) == false)
+ {
+ Assert.Pass($"The feature({Features.AudioOffload} is not supported.");
+ }
+ }
+ }
private async Task<PlayerTrackInfo> GetAudioTrackInfo()
{
var player = await GetPlayingPlayer(Constants.AudioFileSource);
Assert.That(() => audioTrackInfo.Selected = audioTrackInfo.GetCount(),
Throws.TypeOf<ArgumentOutOfRangeException>());
}
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the GetCount if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.PlayerTrackInfo.GetCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void GetCount_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => TestPlayer.AudioTrackInfo.GetCount(), Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the GetLanguageCode if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.PlayerTrackInfo.GetLanguageCode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void GetLanguageCode_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => TestPlayer.AudioTrackInfo.GetLanguageCode(0), Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the Selected if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.PlayerTrackInfo.Selected M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public void Selected_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => TestPlayer.AudioTrackInfo.Selected, Throws.TypeOf<ObjectDisposedException>());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("GetCount throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.PlayerTrackInfo.GetCount M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public async Task GetCount_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ var audioTrackInfo = await GetAudioTrackInfo();
+ Assert.That(() => audioTrackInfo.GetCount(), Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("GetLanguageCode throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.PlayerTrackInfo.GetLanguageCode M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public async Task GetLanguageCode_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ var audioTrackInfo = await GetAudioTrackInfo();
+ Assert.That(() => audioTrackInfo.GetLanguageCode(0), Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Selected throws exception if an audio offload is enabled")]
+ [Property("SPEC", "Tizen.Multimedia.PlayerTrackInfo.Selected A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+ public async Task Selected_THROWS_IF_AUDIOOFFLOAD_ENABLED()
+ {
+ SetAudioOffload();
+ var audioTrackInfo = await GetAudioTrackInfo();
+ Assert.That(() => audioTrackInfo.Selected, Throws.InvalidOperationException);
+ }
}
}
internal const string StreamInfo = "http://tizen.org/feature/multimedia.player.stream_info";
internal const string OpenGl = "http://tizen.org/feature/opengles.version.2_0";
internal const string SphericalVideo = "http://tizen.org/feature/multimedia.player.spherical_video";
+ internal const string AudioOffload = "http://tizen.org/feature/multimedia.player.audio_offload";
}