From: nam Date: Fri, 13 Jul 2018 02:51:19 +0000 (+0900) Subject: [MediaPlayer][ACR-158] add testcase to set zoom level with fov X-Git-Tag: tct5.0_m2~143^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b130cf8ed8a2b525ad350e71f7e67373f5fd934f;p=test%2Ftct%2Fcsharp%2Fapi.git [MediaPlayer][ACR-158] add testcase to set zoom level with fov add some TCs according to fixed descriptions Change-Id: I06c3a12a13544d0ca7c9c8d0eded39117e7713c3 --- diff --git a/tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSAdaptiveVariants.cs b/tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSAdaptiveVariants.cs index 1f3e5ce..6e93c7c 100644 --- a/tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSAdaptiveVariants.cs +++ b/tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSAdaptiveVariants.cs @@ -96,7 +96,7 @@ namespace Tizen.Multimedia.Tests [Test] [Category("P1")] - [Description("SetMaxLimit throws if out of range")] + [Description("SetMaxLimit throws exceptions if out of range")] [Property("SPEC", "Tizen.Multimedia.AdaptiveVariants.SetMaxLimit M")] [Property("SPEC_URL", "-")] [Property("CRITERIA", "MEX")] diff --git a/tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSSphericalVideo.cs b/tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSSphericalVideo.cs index dfaf176..ab29801 100755 --- a/tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSSphericalVideo.cs +++ b/tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSSphericalVideo.cs @@ -109,6 +109,21 @@ namespace Tizen.Multimedia.Tests } [Test] + [Category("P2")] + [Description("Any attempt to call the GetDirectionOfView if the player has been disposed of")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.GetDirectionOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public void GetDirectionOfView_DISPOSED() + { + GetIdlePlayer().Dispose(); + + Assert.That(() => TestPlayer.SphericalVideo.GetDirectionOfView(), + Throws.TypeOf()); + } + + [Test] [Category("P1")] [Description("Gets and sets direction of view for spherical video")] [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetDirectionOfView M")] @@ -128,6 +143,39 @@ namespace Tizen.Multimedia.Tests Assert.That(player.SphericalVideo.GetDirectionOfView(), Is.EqualTo(dov), "Invalid value."); } + [Test] + [Category("P2")] + [Description("SetDirectionOfView throws exceptions if out of range")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetDirectionOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public static void SetDirectionOfView_OUT_OF_RANGE() + { + var player = new Player(); + + Assert.That(() => player.SphericalVideo.SetDirectionOfView(new DirectionOfView(3.141593f, 1.570797f)), + Throws.TypeOf()); + Assert.That(() => player.SphericalVideo.SetDirectionOfView(new DirectionOfView(0.0f, -1.570797f)), + Throws.TypeOf()); + Assert.That(() => player.SphericalVideo.SetDirectionOfView(new DirectionOfView(3.141594f, 1.0f)), + Throws.TypeOf()); + } + + [Test] + [Category("P2")] + [Description("Any attempt to call the SetDirectionOfView if the player has been disposed of")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetDirectionOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public void SetDirectionOfView_DISPOSED() + { + GetIdlePlayer().Dispose(); + + Assert.That(() => TestPlayer.SphericalVideo.SetDirectionOfView(new DirectionOfView(0.0f, -1.0f)), + Throws.TypeOf()); + } [Test] [Category("P1")] @@ -143,6 +191,20 @@ namespace Tizen.Multimedia.Tests Assert.That(player.SphericalVideo.GetZoom(), Is.EqualTo(DefaultValues.level), "Invalid value"); } + [Test] + [Category("P2")] + [Description("Any attempt to call the GetZoom if the player has been disposed of")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.GetZoom M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public void GetZoom_DISPOSED() + { + GetIdlePlayer().Dispose(); + + Assert.That(() => TestPlayer.SphericalVideo.GetZoom(), + Throws.TypeOf()); + } [Test] [Category("P1")] @@ -162,6 +224,40 @@ namespace Tizen.Multimedia.Tests } [Test] + [Category("P2")] + [Description("SetZoom throws exceptions if out of range")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetZoom M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public static void SetZoom_OUT_OF_RANGE() + { + var player = new Player(); + + Assert.That(() => player.SphericalVideo.SetZoom(0.9f), + Throws.TypeOf()); + Assert.That(() => player.SphericalVideo.SetZoom(10.1f), + Throws.TypeOf()); + Assert.That(() => player.SphericalVideo.SetZoom(-3.0f), + Throws.TypeOf()); + } + + [Test] + [Category("P2")] + [Description("Any attempt to call the SetZoom if the player has been disposed of")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetZoom M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public void SetZoom_DISPOSED() + { + GetIdlePlayer().Dispose(); + + Assert.That(() => TestPlayer.SphericalVideo.SetZoom(0.9f), + Throws.TypeOf()); + } + + [Test] [Category("P1")] [Description("Check default value of FieldOfView")] [Property("SPEC", "Tizen.Multimedia.SphericalVideo.GetFieldOfView M")] @@ -177,6 +273,21 @@ namespace Tizen.Multimedia.Tests } [Test] + [Category("P2")] + [Description("Any attempt to call the GetFieldOfView if the player has been disposed of")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.GetFieldOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public void GetFieldOfView_DISPOSED() + { + GetIdlePlayer().Dispose(); + + Assert.That(() => TestPlayer.SphericalVideo.GetFieldOfView(), + Throws.TypeOf()); + } + + [Test] [Category("P1")] [Description("Gets and sets field of view for spherical video")] [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetFieldOfView M")] @@ -192,5 +303,95 @@ namespace Tizen.Multimedia.Tests Assert.That(() => player.SphericalVideo.SetFieldOfView(fov), Throws.Nothing); Assert.That(player.SphericalVideo.GetFieldOfView(), Is.EqualTo(fov), "Invalid value."); } + + [Test] + [Category("P2")] + [Description("SetFieldOfView throws exceptions if out of range")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetFieldOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public static void SetFieldOfView_OUT_OF_RANGE() + { + var player = new Player(); + + Assert.That(() => player.SphericalVideo.SetFieldOfView(new FieldOfView(1, 181)), + Throws.TypeOf()); + Assert.That(() => player.SphericalVideo.SetFieldOfView(new FieldOfView(360, 0)), + Throws.TypeOf()); + Assert.That(() => player.SphericalVideo.SetFieldOfView(new FieldOfView(0, 180)), + Throws.TypeOf()); + } + + [Test] + [Category("P2")] + [Description("Any attempt to call the SetFieldOfView if the player has been disposed of")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetFieldOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public void SetFieldOfView_DISPOSED() + { + GetIdlePlayer().Dispose(); + + Assert.That(() => TestPlayer.SphericalVideo.SetFieldOfView(new FieldOfView(50, 181)), + Throws.TypeOf()); + } + + [Test] + [Category("P1")] + [Description("Gets and sets zoom level with field of view for spherical video")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetZoomWithFieldOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public static void SetZoomWithFieldOfView_CHECK() + { + var player = new Player(); + + FieldOfView fov = new FieldOfView(234, 111); + const float zoom = 1.3f; + + Assert.That(() => player.SphericalVideo.SetZoomWithFieldOfView(zoom, fov), Throws.Nothing); + Assert.That(player.SphericalVideo.GetFieldOfView(), Is.EqualTo(fov), "Invalid value."); + Assert.That(player.SphericalVideo.GetZoom(), Is.EqualTo(zoom), "Invalid value"); + } + + [Test] + [Category("P2")] + [Description("SetZoomWithFieldOfView throws exceptions if out of range")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetZoomWithFieldOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public static void SetZoomWithFieldOfView_OUT_OF_RANGE() + { + var player = new Player(); + + FieldOfView fov = new FieldOfView(234, 111); + FieldOfView invalidFov = new FieldOfView(50, 181); + + Assert.That(() => player.SphericalVideo.SetZoomWithFieldOfView(0.9f, fov), + Throws.TypeOf()); + Assert.That(() => player.SphericalVideo.SetZoomWithFieldOfView(10.1f, fov), + Throws.TypeOf()); + Assert.That(() => player.SphericalVideo.SetZoomWithFieldOfView(1.9f, invalidFov), + Throws.TypeOf()); + } + + [Test] + [Category("P2")] + [Description("Any attempt to call the SetZoomWithFieldOfView if the player has been disposed of")] + [Property("SPEC", "Tizen.Multimedia.SphericalVideo.SetZoomWithFieldOfView M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MEX")] + [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")] + public void SetZoomWithFieldOfView_DISPOSED() + { + GetIdlePlayer().Dispose(); + + Assert.That(() => TestPlayer.SphericalVideo.SetZoomWithFieldOfView(1.0f, new FieldOfView(50, 181)), + Throws.TypeOf()); + } } }