--- /dev/null
+using NUnit.Framework;
+
+namespace Tizen.Multimedia.Tests
+{
+
+ [TestFixture]
+ [Description("Tizen.Multimedia.NotAvailableException Tests")]
+ public class NotAvailableExceptionTests
+ {
+ [Test]
+ [Category("P1")]
+ [Description("Constructor test")]
+ [Property("SPEC", "Tizen.Multimedia.NotAvailableException.NotAvailableException C")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void NotAvailableException_CHECK()
+ {
+ Assert.DoesNotThrow(() => new NotAvailableException("message"));
+ }
+ }
+}
GetIdlePlayer().Dispose();
Assert.That(() => TestPlayer.AudioCodecType = CodecType.Hardware, Throws.TypeOf<ObjectDisposedException>());
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Check VideoCodecType does not throw exceptions")]
+ [Property("SPEC", "Tizen.Multimedia.Player.VideoCodecType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PRW")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void VideoCodecType_CHECK()
+ {
+ TestPlayer.VideoCodecType = CodecType.Software;
+ Assert.That(TestPlayer.VideoCodecType, Is.EqualTo(CodecType.Software));
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("VideoCodecType throws exception if the player is in a not valid state")]
+ [Property("SPEC", "Tizen.Multimedia.Player.VideoCodecType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public async Task VideoCodecType_THROWS_IF_NOT_VALID_STATE()
+ {
+ var player = await GetPreparedPlayer();
+ Assert.That(() => player.VideoCodecType = CodecType.Hardware, Throws.InvalidOperationException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("VideoCodecType throw exception if the param is not valid")]
+ [Property("SPEC", "Tizen.Multimedia.Player.VideoCodecType M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void VideoCodecType_THROWS_IF_PARAM_NOT_VALID()
+ {
+ var player = GetIdlePlayer();
+ Assert.That(() => player.VideoCodecType = (CodecType)5, Throws.ArgumentException);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Any attempt to access the VideoCodecType if the player has been disposed of")]
+ [Property("SPEC", "Tizen.Multimedia.Player.VideoCodecType A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void VideoCodecType_DISPOSED()
+ {
+ GetIdlePlayer().Dispose();
+ Assert.That(() => TestPlayer.VideoCodecType = CodecType.Hardware, Throws.TypeOf<ObjectDisposedException>());
+ }
#endregion
}
}