[Multimedia.UI][Non-ACR] Create new Multimedia.UI.Tests for TCs using UI component 38/239638/3
authorHaesu Gwon <haesu.gwon@samsung.com>
Tue, 28 Jul 2020 09:29:59 +0000 (18:29 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Mon, 3 Aug 2020 02:32:19 +0000 (11:32 +0900)
The Multimedia TCs related UI component should be seperated from Non-UI TCs
for tizeniot service type tc app.

Change-Id: I1b642651ae5fb5481052b9a9bd01e54509f3a772

34 files changed:
tct-suite-vs/Tizen.Camera.Tests/testcase/TSCamera.cs
tct-suite-vs/Tizen.Camera.Tests/testcase/support/TestBase.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSAdaptiveVariants.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSMediaStreamConfiguration.Assigned.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSMediaStreamSource.WithPlayer.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSPlayer.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSSphericalVideo.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/support/TestBase.cs [changed mode: 0755->0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/Program.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/Tizen.Multimedia.UI.Tests.csproj [new file with mode: 0755]
tct-suite-vs/Tizen.Multimedia.UI.Tests/Tizen.Multimedia.UI.Tests.sln [new file with mode: 0755]
tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test.h264 [new file with mode: 0755]
tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test.mp3 [new file with mode: 0755]
tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_360.mp4 [new file with mode: 0755]
tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_drc_640x480_320x240.ts [new file with mode: 0755]
tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_meta.mp4 [new file with mode: 0755]
tct-suite-vs/Tizen.Multimedia.UI.Tests/shared/res/Tizen.Multimedia.UI.Tests.png [new file with mode: 0755]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/Camera/TSCamera.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSAdaptiveVariants.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaPlayer.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaStreamConfiguration.Assigned.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaStreamSource.WithPlayer.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSSphericalVideo.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSStreamInfo.Video.cs [moved from tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSStreamInfo.Video.cs with 81% similarity, mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/Multimedia/TSDisplay.cs [moved from tct-suite-vs/Tizen.Multimedia.Tests/testcase/Common/TSDisplay.cs with 87% similarity]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/CameraTestBase.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/Constants.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/Features.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerNetworkConnection.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerPreconditionUtil.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerTestBase.cs [new file with mode: 0644]
tct-suite-vs/Tizen.Multimedia.UI.Tests/tizen-manifest.xml [new file with mode: 0644]
tool/script/tct-testconfig/tct-testconfig.ini
tool/script/tct-testconfig/tests.xml

index 56fd881..325e2b3 100644 (file)
@@ -408,33 +408,6 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P1")]
-        [Description("Test Display property of the camera.")]
-        [Property("SPEC", "Tizen.Multimedia.Camera.Display A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PRO")]
-        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
-        public void Display_PROPERTY_READ_ONLY()
-        {
-            /* TESTCODE
-             * Test Surface Display Type.
-             * Overlay type is tested always in TestBase.SetUpBase()
-             */
-            try
-            {
-                TestCamera.Display = new Display(new MediaView(CreateWindow()));
-            }
-            catch (NotSupportedException)
-            {
-                Assert.Pass("EVAS surface display type is not supported.");
-            }
-            catch
-            {
-                Assert.Fail("Set display for surface type is failed.");
-            }
-        }
-
-        [Test]
-        [Category("P1")]
         [Description("Test Setting property of the camera.")]
         [Property("SPEC", "Tizen.Multimedia.Camera.Settings A")]
         [Property("SPEC_URL", "-")]
old mode 100755 (executable)
new mode 100644 (file)
index 714ad27..a970916
@@ -1,4 +1,3 @@
-using ElmSharp;
 using NUnit.Framework;
 using System;
 using System.Linq;
@@ -20,20 +19,6 @@ public class TestBase
         {
             Assert.Pass("Camera feature is not supported.");
         }
-
-        /// Default test window type is overlay.
-        try
-        {
-            TestCamera.Display = new Display(CreateWindow());
-        }
-        catch (NotSupportedException)
-        {
-            Assert.Pass("Overlay display type is not supported.");
-        }
-        catch
-        {
-            Assert.Fail("Set display for overlay type is failed.");
-        }
     }
 
     [TearDown]
@@ -59,16 +44,4 @@ public class TestBase
     {
         return FeatureChecker.IsSupported(Features.SecondaryCamera);
     }
-
-    internal static Window CreateWindow()
-    {
-        var w = new Window("");
-        w.Resize(100, 100);
-        w.Realize(null);
-        return w;
-    }
-
-    public static Display CameraOverlayDisplay = new Display(CreateWindow());
-
-    public static Display CameraSurfaceDisplay = new Display(new MediaView(CreateWindow()));
 }
old mode 100755 (executable)
new mode 100644 (file)
index a05ddd1..0f75971
@@ -114,30 +114,6 @@ namespace Tizen.Multimedia.Tests
         }
 
         [Test]
-        [Category("P1")]
-        [Description("Test AdaptiveVariants supported property. Supported list should be greater than 0")]
-        [Property("SPEC", "Tizen.Multimedia.AdaptiveVariants.AvailableAdaptiveVariants A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PRO")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public async Task AvailableAdaptiveVariants_PROPERTY_READ_ONLY()
-        {
-            try
-            {
-                var player = await GetPreparedPlayer(_adaptiveStreamingSource, DefaultDisplay);
-                IList result = player.AdaptiveVariants.AvailableAdaptiveVariants.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");
-            }
-            catch (Exception)
-            {
-                NetworkConncetion.Check();
-                throw;
-            }
-        }
-
-        [Test]
         [Category("P2")]
         [Description("Any attempt to access the AvailableAdaptiveVariants if the player has been disposed of")]
         [Property("SPEC", "Tizen.Multimedia.AdaptiveVariants.AvailableAdaptiveVariants A")]
old mode 100755 (executable)
new mode 100644 (file)
index 6b49001..215ab26
@@ -75,59 +75,5 @@ namespace Tizen.Multimedia.Tests
         {
             Assert.That(() => _configuration.BufferMinThreshold = 101U, Throws.TypeOf<ArgumentOutOfRangeException>());
         }
-
-        [Test]
-        [Category("P1")]
-        [Description("BufferStatusChanged test")]
-        [Property("SPEC", "Tizen.Multimedia.MediaStreamConfiguration.BufferStatusChanged E")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "EVL")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public async Task BufferStatusChanged_CHECK()
-        {
-            await GetPreparedPlayer(_streamSource, DefaultDisplay);
-
-            using (var eventAwaiter = EventAwaiter<MediaStreamBufferStatusChangedEventArgs>.Create())
-            {
-                _configuration.BufferMinThreshold = 10U;
-                _configuration.BufferStatusChanged += eventAwaiter;
-                new VideoDecoderParser(Constants.PushFilePath).Feed((packet) =>
-                {
-                    _streamSource.Push(packet);
-                    packet.Dispose();
-                });
-
-                var args = await eventAwaiter.GetResultAsync();
-
-                Assert.That(args.Status, Is.EqualTo(MediaStreamBufferStatus.Underrun));
-            }
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("SeekingOccurred test")]
-        [Property("SPEC", "Tizen.Multimedia.MediaStreamConfiguration.SeekingOccurred E")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "EVL")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public async Task SeekingOccurred_CHECK()
-        {
-            var player = await GetPreparedPlayer(_streamSource, DefaultDisplay);
-
-            using (var eventAwaiter = EventAwaiter<MediaStreamSeekingOccurredEventArgs>.Create())
-            {
-                _configuration.SeekingOccurred += eventAwaiter;
-
-                new VideoDecoderParser(Constants.PushFilePath).Feed((packet) =>
-                {
-                    _streamSource.Push(packet);
-                    packet.Dispose();
-                });
-
-                await player.SetPlayPositionAsync(40000, true);
-
-                Assert.That(await eventAwaiter.IsRaisedAsync());
-            }
-        }
     }
 }
old mode 100755 (executable)
new mode 100644 (file)
index 9aed7b3..5d008ff
@@ -82,23 +82,6 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P2")]
-        [Description("Push throws if a audio packet is passed to a video source")]
-        [Property("SPEC", "Tizen.Multimedia.MediaStreamSource.Push M")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public async Task Push_THROWS_IF_PACKET_NOT_ACCEPTABLE_VIDEO()
-        {
-            var player = await GetPreparedPlayer(_videoSource, DefaultDisplay);
-
-            using (var audioPacket = MediaPacket.Create(AacAudioFormat))
-            {
-                Assert.That(() => _videoSource.Push(audioPacket), Throws.ArgumentException);
-            }
-        }
-
-        [Test]
-        [Category("P2")]
         [Description("Push throws if the player is in the idle state")]
         [Property("SPEC", "Tizen.Multimedia.MediaStreamSource.Push M")]
         [Property("SPEC_URL", "-")]
old mode 100755 (executable)
new mode 100644 (file)
index 6768ada..c949c28
@@ -557,43 +557,6 @@ namespace Tizen.Multimedia.Tests
         }
         #endregion
 
-        #region AudioOnly
-
-        [Test]
-        [Category("P1")]
-        [Description("Default IsAudioOnly value is false")]
-        [Property("SPEC", "Tizen.Multimedia.Player.IsAudioOnly A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PDV")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public async Task IsAudioOnly_DEFAULT()
-        {
-            var player = await GetPreparedPlayer(
-                    new MediaUriSource(Constants.VideoFilePath), DefaultDisplay);
-
-            Assert.That(player.IsAudioOnly, Is.False);
-
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("check whether IsAudioOnly is readable and writable")]
-        [Property("SPEC", "Tizen.Multimedia.Player.IsAudioOnly A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PRW")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public async Task IsAudioOnly_SET_GET()
-        {
-            var player = await GetPreparedPlayer(
-                    new MediaUriSource(Constants.VideoFilePath), DefaultDisplay);
-
-            const bool newValue = true;
-
-            player.IsAudioOnly = newValue;
-            Assert.That(player.IsAudioOnly, Is.EqualTo(newValue));
-        }
-
-        #endregion
 
         #region AudioLatencyMode
 
@@ -1520,35 +1483,6 @@ namespace Tizen.Multimedia.Tests
         }
 
         [Test]
-        [Category("P2")]
-        [Description("Display can't be assigned to multiple players")]
-        [Property("SPEC", "Tizen.Multimedia.Player.Display A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PEX")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public void Display_THROWS_IF_SET_TO_MULTIPLE()
-        {
-            using (Player p = new Player())
-            {
-                TestPlayer.Display = DefaultDisplay;
-
-                Assert.That(() => p.Display = DefaultDisplay, Throws.ArgumentException);
-            }
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Display set test")]
-        [Property("SPEC", "Tizen.Multimedia.Player.Display A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PCST")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public void Display_SET_CHECK()
-        {
-            Assert.That(() => TestPlayer.Display = DefaultDisplay, Throws.Nothing);
-        }
-
-        [Test]
         [Category("P1")]
         [Description("Is always not null")]
         [Property("SPEC", "Tizen.Multimedia.Player.DisplaySettings A")]
@@ -2138,66 +2072,6 @@ namespace Tizen.Multimedia.Tests
         }
         #endregion
 
-        #region VideoStreamChanged
-
-        [Test]
-        [Category("P1")]
-        [Description("VideoStreamChanged test")]
-        [Property("SPEC", "Tizen.Multimedia.Player.VideoStreamChanged E")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "EVL")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public async Task VideoStreamChanged_CHECK()
-        {
-            using (var eventAwaiter = EventAwaiter<VideoStreamChangedEventArgs>.Create())
-            {
-                var player = await GetPreparedPlayer(
-                    new MediaUriSource(Constants.StreamChangedTestFilePath), DefaultDisplay);
-
-                player.VideoStreamChanged += eventAwaiter;
-
-                player.Start();
-
-                await player.SetPlayPositionAsync(4500, true);
-
-                Assert.That(await eventAwaiter.IsRaisedAsync(), "Event wasn't raised.");
-            }
-        }
-
-        #endregion
-
-        #region PlaybackInterrupted
-
-        [Test]
-        [Category("P1")]
-        [Description("PlaybackInterrupted test")]
-        [Property("SPEC", "Tizen.Multimedia.Player.PlaybackInterrupted E")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "EVL")]
-        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
-        public async Task PlaybackInterrupted_CHECK()
-        {
-            var source = Constants.VideoFileSource;
-
-            using (var eventWaiter = EventAwaiter<PlaybackInterruptedEventArgs>.Create())
-            {
-                var player = await GetPreparedPlayer(
-                    new MediaUriSource(Constants.StreamChangedTestFilePath), DefaultDisplay);
-
-                player.PlaybackInterrupted += eventWaiter;
-
-                using (Player secondPlayer = new Player())
-                {
-                    secondPlayer.SetSource(source);
-                    secondPlayer.Display = new Display(CreateWindow());
-                    await secondPlayer.PrepareAsync();
-                }
-                Assert.That(await eventWaiter.IsRaisedAsync());
-            }
-        }
-
-        #endregion
-
         #region ErrorOccurred
 
         [Test]
@@ -2256,26 +2130,6 @@ namespace Tizen.Multimedia.Tests
 
         #region VideoRoi
         [Test]
-        [Category("P1")]
-        [Description("SetVideoRoi default test")]
-        [Property("SPEC", "Tizen.Multimedia.Player.SetVideoRoi M")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "MCST")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public void SetVideoRoi_DEFAULT()
-        {
-            Player player = new Player();
-            player.SetSource(Constants.VideoFileSource);
-            player.Display = new Display(CreateWindow());
-
-            ScaleRectangle sr = new ScaleRectangle(0.19, 0.98765, 1.0, 0.21548);
-
-            Assert.That(() => player.SetVideoRoi(sr), Throws.Nothing);
-            Assert.That(player.GetVideoRoi(), Is.EqualTo(sr), "Invalid value.");
-            player.Dispose();
-        }
-
-        [Test]
         [Category("P2")]
         [Description("Any attempt to call the SetVideoRoi if the player has been disposed of")]
         [Property("SPEC", "Tizen.Multimedia.Player.SetVideoRoi M")]
@@ -2292,27 +2146,6 @@ namespace Tizen.Multimedia.Tests
 
         [Test]
         [Category("P2")]
-        [Description("SetVideoRoi throws exceptions if out of range")]
-        [Property("SPEC", "Tizen.Multimedia.Player.SetVideoRoi M")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "MEX")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public void SetVideoRoi_OUT_OF_RANGE()
-        {
-            Player player = new Player();
-            player.SetSource(Constants.VideoFileSource);
-            player.Display = new Display(CreateWindow());
-
-            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(0, 0, 0, 0)), Throws.TypeOf<ArgumentOutOfRangeException>());
-            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(0.1, 0.1, 0.18, 4)), Throws.TypeOf<ArgumentOutOfRangeException>());
-            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(0.99, -0.1, 1, 1)), Throws.TypeOf<ArgumentOutOfRangeException>());
-            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(0.1, 0.1, 1.1, 1)), Throws.TypeOf<ArgumentOutOfRangeException>());
-            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(-3, 0.1, 1, 1)), Throws.TypeOf<ArgumentOutOfRangeException>());
-            player.Dispose();
-        }
-
-        [Test]
-        [Category("P2")]
         [Description("SetVideoRoi throws if display has wrong type")]
         [Property("SPEC", "Tizen.Multimedia.Player.SetVideoRoi M")]
         [Property("SPEC_URL", "-")]
old mode 100755 (executable)
new mode 100644 (file)
index 6c89edd..8ce514f
@@ -1,4 +1,4 @@
-using NUnit.Framework;
+using NUnit.Framework;
 using System;
 using System.IO;
 using System.Threading.Tasks;
@@ -28,71 +28,6 @@ namespace Tizen.Multimedia.Tests
             public const int VerticalDegrees = 67;
         }
 
-        protected async Task<SphericalVideo> GetSphericalVideo()
-        {
-            return (await GetPlayingPlayer(Constants.SphericalVideoSource, DefaultDisplay)).SphericalVideo;
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Player always not null")]
-        [Property("SPEC", "Tizen.Multimedia.SphericalVideo.Player A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PDV")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public async Task Player_CHECK()
-        {
-            Assert.That((await GetSphericalVideo()).Player, Is.Not.Null);
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("Check whether IsEnabled is readable and writable")]
-        [Property("SPEC", "Tizen.Multimedia.SphericalVideo.IsEnabled A")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "PRW")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public async Task IsEnabled_SET_GET()
-        {
-            var player = await GetPreparedPlayer(
-                    new MediaUriSource(Constants.SphericalVideoPath), DefaultDisplay);
-
-            const bool newValue = true;
-
-            player.SphericalVideo.IsEnabled = newValue;
-            Assert.That(player.SphericalVideo.IsEnabled, Is.EqualTo(newValue), "Invalid value");
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("IsSphericalContent throws if the video is spherical content")]
-        [Property("SPEC", "Tizen.Multimedia.SphericalVideo.IsSphericalContent M")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "MR")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public async Task IsSphericalContent_TRUE()
-        {
-            var player = await GetPreparedPlayer(
-                    new MediaUriSource(Constants.SphericalVideoPath), DefaultDisplay);
-
-            Assert.That(player.SphericalVideo.IsSphericalContent(), Is.True, "Invalid value");
-        }
-
-        [Test]
-        [Category("P1")]
-        [Description("IsSphericalContent throws if the video is not spherical content")]
-        [Property("SPEC", "Tizen.Multimedia.SphericalVideo.IsSphericalContent M")]
-        [Property("SPEC_URL", "-")]
-        [Property("CRITERIA", "MR")]
-        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
-        public async Task IsSphericalContent_FALSE()
-        {
-            var player = await GetPreparedPlayer(
-                    new MediaUriSource(Constants.VideoFilePath), DefaultDisplay);
-
-            Assert.That(player.SphericalVideo.IsSphericalContent(), Is.False, "Invalid value");
-        }
-
         [Test]
         [Category("P1")]
         [Description("Check default value of DirectionOfView")]
old mode 100755 (executable)
new mode 100644 (file)
index ffaf170..03b2f9f
@@ -1,4 +1,4 @@
-using ElmSharp;
+using ElmSharp;
 using NUnit.Framework;
 using NUnit.Framework.TUnit;
 using System;
@@ -87,14 +87,4 @@ public class TestBase
 
         return TestPlayer;
     }
-
-    internal static Window CreateWindow()
-    {
-        var w = new Window("");
-        w.Resize(100, 100);
-        w.Realize(null);
-        return w;
-    }
-
-    public static Display DefaultDisplay = new Display(CreateWindow());
 }
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/Program.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/Program.cs
new file mode 100644 (file)
index 0000000..129489a
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ *  Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License
+ */
+
+using System;
+using NUnitLite.TUnit;
+using AutoTemplate;
+
+namespace XamarinForTizen.Tizen
+{
+
+    class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
+    {
+        private static App _app;
+        protected override void OnCreate()
+        {
+            base.OnCreate();
+
+            Console.WriteLine("TCT : OnCreate()");
+            _app = new App();
+            LoadApplication(_app);
+
+            TRunner t = new TRunner();
+            t.LoadTestsuite();
+            t.Execute();
+        }
+
+        public static App getApp()
+        {
+            return _app;
+        }
+        static void Main(string[] args)
+        {
+            Console.WriteLine("TCT : Main()");
+            var app = new Program();
+            global::Xamarin.Forms.Forms.Init(app);
+            app.Run(args);
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/Tizen.Multimedia.UI.Tests.csproj b/tct-suite-vs/Tizen.Multimedia.UI.Tests/Tizen.Multimedia.UI.Tests.csproj
new file mode 100755 (executable)
index 0000000..0a96067
--- /dev/null
@@ -0,0 +1,41 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <!-- Property Group for .NET Core Project -->
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>tizen80</TargetFramework>
+    <TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
+  </PropertyGroup>
+
+  <!-- Property Group for Tizen Project -->
+  <PropertyGroup>
+    <TizenCreateTpkOnBuild>true</TizenCreateTpkOnBuild>
+  </PropertyGroup>
+
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugType>portable</DebugType>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>None</DebugType>
+  </PropertyGroup>
+
+  <ItemGroup>
+       <Folder Include="lib\" />
+  </ItemGroup>
+
+  <Import Project="..\Common\dependencies.props" />
+
+  <ItemGroup>
+    <PackageReference Include="Tizen.NET" Version="$(TizenNETVersion)">
+      <ExcludeAssets>Runtime</ExcludeAssets>
+    </PackageReference>
+    <PackageReference Include="Tizen.NET.Sdk" Version="$(TizenNETSdkVersion)" />
+  </ItemGroup>
+
+  <!-- Include Nuget Package for Tizen Project building -->
+  <ItemGroup>
+    <ProjectReference Include="..\Template\AutoTemplate\AutoTemplate.csproj" />
+    <ProjectReference Include="..\Tizen.Multimedia.Support.Library\Tizen.Multimedia.Support.Library.csproj" />
+  </ItemGroup>
+
+</Project>
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/Tizen.Multimedia.UI.Tests.sln b/tct-suite-vs/Tizen.Multimedia.UI.Tests/Tizen.Multimedia.UI.Tests.sln
new file mode 100755 (executable)
index 0000000..d7b1efe
--- /dev/null
@@ -0,0 +1,92 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.15
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Multimedia.UI.Tests", "Tizen.Multimedia.UI.Tests.csproj", "{D92BEEAC-3B2A-45F8-8C53-53B92550404A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunit.framework", "..\nunit.framework\nunit.framework.csproj", "{B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nunitlite", "..\nunitlite\nunitlite.csproj", "{FDB8025A-C029-461F-895E-287B4C65939B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoTemplate", "..\Template\AutoTemplate\AutoTemplate.csproj", "{B11ABB0C-C3C1-4B5C-8251-A15628A775F3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Multimedia.Support.Library", "..\Tizen.Multimedia.Support.Library\Tizen.Multimedia.Support.Library.csproj", "{612D4512-0652-41F2-A192-426C76BE99F1}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+               Debug|x64 = Debug|x64
+               Debug|x86 = Debug|x86
+               Release|Any CPU = Release|Any CPU
+               Release|x64 = Release|x64
+               Release|x86 = Release|x86
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.ActiveCfg = Debug|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x64.Build.0 = Debug|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.ActiveCfg = Debug|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Debug|x86.Build.0 = Debug|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|Any CPU.Build.0 = Release|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.ActiveCfg = Release|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x64.Build.0 = Release|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.ActiveCfg = Release|Any CPU
+               {D92BEEAC-3B2A-45F8-8C53-53B92550404A}.Release|x86.Build.0 = Release|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.ActiveCfg = Debug|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x64.Build.0 = Debug|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.ActiveCfg = Debug|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Debug|x86.Build.0 = Debug|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|Any CPU.Build.0 = Release|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.ActiveCfg = Release|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x64.Build.0 = Release|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.ActiveCfg = Release|Any CPU
+               {B9E7C1FD-CB38-42F7-AC43-7BD2E5B4D216}.Release|x86.Build.0 = Release|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.ActiveCfg = Debug|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x64.Build.0 = Debug|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.ActiveCfg = Debug|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Debug|x86.Build.0 = Debug|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|Any CPU.Build.0 = Release|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.ActiveCfg = Release|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x64.Build.0 = Release|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.ActiveCfg = Release|Any CPU
+               {FDB8025A-C029-461F-895E-287B4C65939B}.Release|x86.Build.0 = Release|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x64.ActiveCfg = Debug|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x64.Build.0 = Debug|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x86.ActiveCfg = Debug|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Debug|x86.Build.0 = Debug|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|Any CPU.Build.0 = Release|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x64.ActiveCfg = Release|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x64.Build.0 = Release|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x86.ActiveCfg = Release|Any CPU
+               {B11ABB0C-C3C1-4B5C-8251-A15628A775F3}.Release|x86.Build.0 = Release|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Debug|x64.ActiveCfg = Debug|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Debug|x64.Build.0 = Debug|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Debug|x86.ActiveCfg = Debug|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Debug|x86.Build.0 = Debug|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Release|Any CPU.Build.0 = Release|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Release|x64.ActiveCfg = Release|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Release|x64.Build.0 = Release|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Release|x86.ActiveCfg = Release|Any CPU
+               {612D4512-0652-41F2-A192-426C76BE99F1}.Release|x86.Build.0 = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+               SolutionGuid = {ED382B91-9930-40B6-B3D7-362304C78680}
+       EndGlobalSection
+EndGlobal
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test.h264 b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test.h264
new file mode 100755 (executable)
index 0000000..83016b9
Binary files /dev/null and b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test.h264 differ
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test.mp3 b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test.mp3
new file mode 100755 (executable)
index 0000000..5fb75b1
Binary files /dev/null and b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test.mp3 differ
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_360.mp4 b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_360.mp4
new file mode 100755 (executable)
index 0000000..294fe32
Binary files /dev/null and b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_360.mp4 differ
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_drc_640x480_320x240.ts b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_drc_640x480_320x240.ts
new file mode 100755 (executable)
index 0000000..633dd32
Binary files /dev/null and b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_drc_640x480_320x240.ts differ
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_meta.mp4 b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_meta.mp4
new file mode 100755 (executable)
index 0000000..d6e1050
Binary files /dev/null and b/tct-suite-vs/Tizen.Multimedia.UI.Tests/res/test_meta.mp4 differ
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/shared/res/Tizen.Multimedia.UI.Tests.png b/tct-suite-vs/Tizen.Multimedia.UI.Tests/shared/res/Tizen.Multimedia.UI.Tests.png
new file mode 100755 (executable)
index 0000000..9765b1b
Binary files /dev/null and b/tct-suite-vs/Tizen.Multimedia.UI.Tests/shared/res/Tizen.Multimedia.UI.Tests.png differ
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/Camera/TSCamera.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/Camera/TSCamera.cs
new file mode 100644 (file)
index 0000000..88eb763
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright 2020 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using NUnit.Framework;
+using System;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    [TestFixture]
+    [Description("Tests Tizen.Multimedia.Camera class")]
+    public class CameraTests : CameraTestBase
+    {
+        [Test]
+        [Category("P1")]
+        [Description("Test Display property of the camera.")]
+        [Property("SPEC", "Tizen.Multimedia.Camera.Display A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+        public void Display_PROPERTY_READ_ONLY()
+        {
+            /* TESTCODE
+             * Test Surface Display Type.
+             * Overlay type is tested always in TestBase.SetUpBase()
+             */
+            try
+            {
+                TestCamera.Display = new Display(new MediaView(CreateWindow()));
+            }
+            catch (NotSupportedException)
+            {
+                Assert.Pass("EVAS surface display type is not supported.");
+            }
+            catch
+            {
+                Assert.Fail("Set display for surface type is failed.");
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSAdaptiveVariants.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSAdaptiveVariants.cs
new file mode 100644 (file)
index 0000000..f8b1b55
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using NUnit.Framework;
+using System.Threading.Tasks;
+using System.Linq;
+using System.Collections;
+using System;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Multimedia.AdaptiveVariants Tests")]
+    public class AdaptiveVariantsTests : MediaPlayerTestBase
+    {
+        private MediaUriSource _adaptiveStreamingSource = null;
+
+        [OneTimeSetUp]
+        public void Init()
+        {
+            if (MediaPlayerPreconditionUtils.ADAPTIVE_STREAMING_URI == null)
+                MediaPlayerPreconditionUtils.SetPrecondition();
+
+            _adaptiveStreamingSource = new MediaUriSource(MediaPlayerPreconditionUtils.ADAPTIVE_STREAMING_URI);
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Test AdaptiveVariants supported property. Supported list should be greater than 0")]
+        [Property("SPEC", "Tizen.Multimedia.AdaptiveVariants.AvailableAdaptiveVariants A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRO")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public async Task AvailableAdaptiveVariants_PROPERTY_READ_ONLY()
+        {
+            try
+            {
+                var player = await GetPreparedPlayer(_adaptiveStreamingSource, DefaultDisplay);
+                IList result = player.AdaptiveVariants.AvailableAdaptiveVariants.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");
+            }
+            catch (Exception)
+            {
+                NetworkConncetion.Check();
+                throw;
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaPlayer.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaPlayer.cs
new file mode 100644 (file)
index 0000000..901cf6f
--- /dev/null
@@ -0,0 +1,195 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using NUnit.Framework;
+using System;
+using System.Threading.Tasks;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+#pragma warning disable CS4014
+
+    [TestFixture]
+    [Description("Tizen.Multimedia.UI tests")]
+    public class PlayerTests : MediaPlayerTestBase
+    {
+        #region AudioOnly
+        [Test]
+        [Category("P1")]
+        [Description("Default IsAudioOnly value is false")]
+        [Property("SPEC", "Tizen.Multimedia.Player.IsAudioOnly A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PDV")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public async Task IsAudioOnly_DEFAULT()
+        {
+            var player = await GetPreparedPlayer(
+                    new MediaUriSource(Constants.VideoFilePath), DefaultDisplay);
+
+            Assert.That(player.IsAudioOnly, Is.False);
+
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("check whether IsAudioOnly is readable and writable")]
+        [Property("SPEC", "Tizen.Multimedia.Player.IsAudioOnly A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public async Task IsAudioOnly_SET_GET()
+        {
+            var player = await GetPreparedPlayer(
+                    new MediaUriSource(Constants.VideoFilePath), DefaultDisplay);
+
+            const bool newValue = true;
+
+            player.IsAudioOnly = newValue;
+            Assert.That(player.IsAudioOnly, Is.EqualTo(newValue));
+        }
+        #endregion
+
+        #region Display
+        [Test]
+        [Category("P2")]
+        [Description("Display can't be assigned to multiple players")]
+        [Property("SPEC", "Tizen.Multimedia.Player.Display A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PEX")]
+        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
+        public void Display_THROWS_IF_SET_TO_MULTIPLE()
+        {
+            using (Player p = new Player())
+            {
+                TestPlayer.Display = DefaultDisplay;
+
+                Assert.That(() => p.Display = DefaultDisplay, Throws.ArgumentException);
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Display set test")]
+        [Property("SPEC", "Tizen.Multimedia.Player.Display A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PCST")]
+        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
+        public void Display_SET_CHECK()
+        {
+            Assert.That(() => TestPlayer.Display = DefaultDisplay, Throws.Nothing);
+        }
+        #endregion
+
+        #region VideoStreamChanged
+        [Test]
+        [Category("P1")]
+        [Description("VideoStreamChanged test")]
+        [Property("SPEC", "Tizen.Multimedia.Player.VideoStreamChanged E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
+        public async Task VideoStreamChanged_CHECK()
+        {
+            using (var eventAwaiter = EventAwaiter<VideoStreamChangedEventArgs>.Create())
+            {
+                var player = await GetPreparedPlayer(
+                    new MediaUriSource(Constants.StreamChangedTestFilePath), DefaultDisplay);
+
+                player.VideoStreamChanged += eventAwaiter;
+
+                player.Start();
+
+                await player.SetPlayPositionAsync(4500, true);
+
+                Assert.That(await eventAwaiter.IsRaisedAsync(), "Event wasn't raised.");
+            }
+        }
+        #endregion
+
+        #region PlaybackInterrupted
+        [Test]
+        [Category("P1")]
+        [Description("PlaybackInterrupted test")]
+        [Property("SPEC", "Tizen.Multimedia.Player.PlaybackInterrupted E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
+        public async Task PlaybackInterrupted_CHECK()
+        {
+            var source = Constants.VideoFileSource;
+
+            using (var eventWaiter = EventAwaiter<PlaybackInterruptedEventArgs>.Create())
+            {
+                var player = await GetPreparedPlayer(
+                    new MediaUriSource(Constants.StreamChangedTestFilePath), DefaultDisplay);
+
+                player.PlaybackInterrupted += eventWaiter;
+
+                using (Player secondPlayer = new Player())
+                {
+                    secondPlayer.SetSource(source);
+                    secondPlayer.Display = new Display(CreateWindow());
+                    await secondPlayer.PrepareAsync();
+                }
+                Assert.That(await eventWaiter.IsRaisedAsync());
+            }
+        }
+        #endregion
+
+        #region VideoRoi
+        [Test]
+        [Category("P1")]
+        [Description("SetVideoRoi default test")]
+        [Property("SPEC", "Tizen.Multimedia.Player.SetVideoRoi M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MCST")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public void SetVideoRoi_DEFAULT()
+        {
+            Player player = new Player();
+            player.SetSource(Constants.VideoFileSource);
+            player.Display = new Display(CreateWindow());
+
+            ScaleRectangle sr = new ScaleRectangle(0.19, 0.98765, 1.0, 0.21548);
+
+            Assert.That(() => player.SetVideoRoi(sr), Throws.Nothing);
+            Assert.That(player.GetVideoRoi(), Is.EqualTo(sr), "Invalid value.");
+            player.Dispose();
+        }
+
+        [Test]
+        [Category("P2")]
+        [Description("SetVideoRoi throws exceptions if out of range")]
+        [Property("SPEC", "Tizen.Multimedia.Player.SetVideoRoi M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MEX")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public void SetVideoRoi_OUT_OF_RANGE()
+        {
+            Player player = new Player();
+            player.SetSource(Constants.VideoFileSource);
+            player.Display = new Display(CreateWindow());
+
+            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(0, 0, 0, 0)), Throws.TypeOf<ArgumentOutOfRangeException>());
+            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(0.1, 0.1, 0.18, 4)), Throws.TypeOf<ArgumentOutOfRangeException>());
+            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(0.99, -0.1, 1, 1)), Throws.TypeOf<ArgumentOutOfRangeException>());
+            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(0.1, 0.1, 1.1, 1)), Throws.TypeOf<ArgumentOutOfRangeException>());
+            Assert.That(() => player.SetVideoRoi(new ScaleRectangle(-3, 0.1, 1, 1)), Throws.TypeOf<ArgumentOutOfRangeException>());
+            player.Dispose();
+        }
+        #endregion
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaStreamConfiguration.Assigned.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaStreamConfiguration.Assigned.cs
new file mode 100644 (file)
index 0000000..7ec66cd
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using NUnit.Framework;
+using System.Threading.Tasks;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Multimedia.MediaSteramConfiguration tests")]
+    public class MediaStreamConfigurationAssignedTests : MediaPlayerTestBase
+    {
+        private MediaStreamSource _streamSource;
+        private MediaStreamConfiguration _configuration;
+
+        [SetUp]
+        public void SetUp()
+        {
+            _streamSource = new MediaStreamSource(VideoDecoderParser.Format);
+            _configuration = _streamSource.VideoConfiguration;
+
+            GetIdlePlayer().SetSource(_streamSource);
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("BufferStatusChanged test")]
+        [Property("SPEC", "Tizen.Multimedia.MediaStreamConfiguration.BufferStatusChanged E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
+        public async Task BufferStatusChanged_CHECK()
+        {
+            await GetPreparedPlayer(_streamSource, DefaultDisplay);
+
+            using (var eventAwaiter = EventAwaiter<MediaStreamBufferStatusChangedEventArgs>.Create())
+            {
+                _configuration.BufferMinThreshold = 10U;
+                _configuration.BufferStatusChanged += eventAwaiter;
+                new VideoDecoderParser(Constants.PushFilePath).Feed((packet) =>
+                {
+                    _streamSource.Push(packet);
+                    packet.Dispose();
+                });
+
+                var args = await eventAwaiter.GetResultAsync();
+
+                Assert.That(args.Status, Is.EqualTo(MediaStreamBufferStatus.Underrun));
+            }
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("SeekingOccurred test")]
+        [Property("SPEC", "Tizen.Multimedia.MediaStreamConfiguration.SeekingOccurred E")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "EVL")]
+        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
+        public async Task SeekingOccurred_CHECK()
+        {
+            var player = await GetPreparedPlayer(_streamSource, DefaultDisplay);
+
+            using (var eventAwaiter = EventAwaiter<MediaStreamSeekingOccurredEventArgs>.Create())
+            {
+                _configuration.SeekingOccurred += eventAwaiter;
+
+                new VideoDecoderParser(Constants.PushFilePath).Feed((packet) =>
+                {
+                    _streamSource.Push(packet);
+                    packet.Dispose();
+                });
+
+                await player.SetPlayPositionAsync(40000, true);
+
+                Assert.That(await eventAwaiter.IsRaisedAsync());
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaStreamSource.WithPlayer.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSMediaStreamSource.WithPlayer.cs
new file mode 100644 (file)
index 0000000..ef393b7
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using NUnit.Framework;
+using System.Threading.Tasks;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Multimedia.MediaStreamSource Tests")]
+    public class MediaStreamSourceWithPlayerTests : MediaPlayerTestBase
+    {
+        private static readonly AudioMediaFormat AacAudioFormat = new AudioMediaFormat(
+            MediaFormatAudioMimeType.Aac, 2, 48000, 16, 128000);
+
+        private MediaStreamSource _audioSource = new MediaStreamSource(AacAudioFormat);
+        private MediaStreamSource _videoSource = new MediaStreamSource(VideoDecoderParser.Format);
+
+        [Test]
+        [Category("P2")]
+        [Description("Push throws if a audio packet is passed to a video source")]
+        [Property("SPEC", "Tizen.Multimedia.MediaStreamSource.Push M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MEX")]
+        [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
+        public async Task Push_THROWS_IF_PACKET_NOT_ACCEPTABLE_VIDEO()
+        {
+            var player = await GetPreparedPlayer(_videoSource, DefaultDisplay);
+
+            using (var audioPacket = MediaPacket.Create(AacAudioFormat))
+            {
+                Assert.That(() => _videoSource.Push(audioPacket), Throws.ArgumentException);
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSSphericalVideo.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/MediaPlayer/TSSphericalVideo.cs
new file mode 100644 (file)
index 0000000..664e467
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using NUnit.Framework;
+using System.Threading.Tasks;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    [TestFixture]
+    [Description("Tizen.Multimedia.SphericalVideo Tests")]
+    public class SphericalVideoTests : MediaPlayerTestBase
+    {
+        [SetUp]
+        public void SetUp()
+        {
+            if (FeatureChecker.IsSupported(Features.OpenGl) == false
+                || FeatureChecker.IsSupported(Features.SphericalVideo) == false)
+            {
+                Assert.Pass($"The feature is not supported.");
+            }
+        }
+
+        private class DefaultValues
+        {
+            public const float Yaw = 0.0f;
+            public const float Pitch = 0.0f;
+            public const float level = 1.0f;
+            public const int HorizontalDegrees = 120;
+            public const int VerticalDegrees = 67;
+        }
+
+        protected async Task<SphericalVideo> GetSphericalVideo()
+        {
+            return (await GetPlayingPlayer(Constants.SphericalVideoSource, DefaultDisplay)).SphericalVideo;
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Player always not null")]
+        [Property("SPEC", "Tizen.Multimedia.SphericalVideo.Player A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PDV")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public async Task Player_CHECK()
+        {
+            Assert.That((await GetSphericalVideo()).Player, Is.Not.Null);
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("Check whether IsEnabled is readable and writable")]
+        [Property("SPEC", "Tizen.Multimedia.SphericalVideo.IsEnabled A")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "PRW")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public async Task IsEnabled_SET_GET()
+        {
+            var player = await GetPreparedPlayer(
+                    new MediaUriSource(Constants.SphericalVideoPath), DefaultDisplay);
+
+            const bool newValue = true;
+
+            player.SphericalVideo.IsEnabled = newValue;
+            Assert.That(player.SphericalVideo.IsEnabled, Is.EqualTo(newValue), "Invalid value");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("IsSphericalContent throws if the video is spherical content")]
+        [Property("SPEC", "Tizen.Multimedia.SphericalVideo.IsSphericalContent M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public async Task IsSphericalContent_TRUE()
+        {
+            var player = await GetPreparedPlayer(
+                    new MediaUriSource(Constants.SphericalVideoPath), DefaultDisplay);
+
+            Assert.That(player.SphericalVideo.IsSphericalContent(), Is.True, "Invalid value");
+        }
+
+        [Test]
+        [Category("P1")]
+        [Description("IsSphericalContent throws if the video is not spherical content")]
+        [Property("SPEC", "Tizen.Multimedia.SphericalVideo.IsSphericalContent M")]
+        [Property("SPEC_URL", "-")]
+        [Property("CRITERIA", "MR")]
+        [Property("AUTHOR", "Jeongyoon Nam, just.nam@samsung.com")]
+        public async Task IsSphericalContent_FALSE()
+        {
+            var player = await GetPreparedPlayer(
+                    new MediaUriSource(Constants.VideoFilePath), DefaultDisplay);
+
+            Assert.That(player.SphericalVideo.IsSphericalContent(), Is.False, "Invalid value");
+        }
+    }
+}
@@ -1,12 +1,28 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
 using NUnit.Framework;
 using System;
 using System.Threading.Tasks;
 
-namespace Tizen.Multimedia.Tests
+namespace Tizen.Multimedia.UI.Tests
 {
     [TestFixture]
     [Description("Tizen.Multimedia.StreamInfo tests")]
-    public class StreamInfoVideoTests : TestBase
+    public class StreamInfoVideoTests : MediaPlayerTestBase
     {
         private class ExpectedValues
         {
@@ -1,4 +1,4 @@
-// Copyright 2016 by Samsung Electronics, Inc.,
+// Copyright 2020 by Samsung Electronics, Inc.,
 //
 // This software is the confidential and proprietary information
 // of Samsung Electronics, Inc. ("Confidential Information"). You
@@ -9,14 +9,12 @@
 using NUnit.Framework;
 using System;
 
-namespace Tizen.Multimedia.Tests
+namespace Tizen.Multimedia.UI.Tests
 {
     [TestFixture]
     [Description("Tests Tizen.Multimedia.Display class")]
     public class DisplayTests
     {
-        private const string RawVideoFeature = "http://tizen.org/feature/multimedia.raw_video";
-
         [Test]
         [Category("P1")]
         [Description("Construction with MediaView")]
@@ -33,7 +31,7 @@ namespace Tizen.Multimedia.Tests
             }
             catch (NotSupportedException e)
             {
-                if (FeatureChecker.IsSupported(RawVideoFeature))
+                if (FeatureChecker.IsSupported(Features.RawVideo))
                 {
                     Assert.Fail($"Invalid NotSupportedException; {e.Message}");
                 }
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/CameraTestBase.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/CameraTestBase.cs
new file mode 100644 (file)
index 0000000..1a3d607
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using ElmSharp;
+using NUnit.Framework;
+using System;
+using System.Linq;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    public class CameraTestBase
+    {
+        public static Camera TestCamera { get; private set; }
+
+        [SetUp]
+        public void SetUpBase()
+        {
+            try
+            {
+                TestCamera = new Camera(CameraDevice.Rear);
+                TestCamera.Settings.PreviewPixelFormat = TestCamera.Capabilities.SupportedPreviewPixelFormats.FirstOrDefault();
+            }
+            catch (NotSupportedException) when (FeatureChecker.IsSupported(Features.PrimaryCamera) == false)
+            {
+                Assert.Pass("Camera feature is not supported.");
+            }
+
+            /// Default test window type is overlay.
+            try
+            {
+                TestCamera.Display = new Display(CreateWindow());
+            }
+            catch (NotSupportedException)
+            {
+                Assert.Pass("Overlay display type is not supported.");
+            }
+            catch
+            {
+                Assert.Fail("Set display for overlay type is failed.");
+            }
+        }
+
+        [TearDown]
+        public void TearDownBase()
+        {
+            if (TestCamera != null)
+            {
+                if (TestCamera.State == CameraState.Captured)
+                {
+                    TestCamera.StartPreview();
+                    TestCamera.StopPreview();
+                }
+                else if (TestCamera.State == CameraState.Preview)
+                {
+                    TestCamera.StopPreview();
+                }
+
+                TestCamera?.Dispose();
+            }
+        }
+
+        internal static bool IsSupportedSecondaryCamera()
+        {
+            return FeatureChecker.IsSupported(Features.SecondaryCamera);
+        }
+
+        internal static Window CreateWindow()
+        {
+            var w = new Window("");
+            w.Resize(100, 100);
+            w.Realize(null);
+            return w;
+        }
+
+        public static Display CameraOverlayDisplay = new Display(CreateWindow());
+
+        public static Display CameraSurfaceDisplay = new Display(new MediaView(CreateWindow()));
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/Constants.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/Constants.cs
new file mode 100644 (file)
index 0000000..8cd019b
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    internal static class Constants
+    {
+        internal const int AudioLength = 33384;
+
+        internal const string AudioFilePath = "/opt/usr/home/owner/share/res/test.mp3";
+        internal const string PushFilePath = "/opt/usr/home/owner/share/res/test.h264"; // no pts
+        internal const string VideoFilePath = "/opt/usr/home/owner/share/res/test_meta.mp4";
+        internal const string SphericalVideoPath = "/opt/usr/home/owner/share/res/test_360.mp4";
+
+        internal const string StreamChangedTestFilePath = "/opt/usr/home/owner/share/res/test_drc_640x480_320x240.ts";
+
+        internal static readonly MediaUriSource AudioFileSource = new MediaUriSource(AudioFilePath);
+        internal static readonly MediaUriSource VideoFileSource = new MediaUriSource(VideoFilePath);
+        internal static readonly MediaUriSource SphericalVideoSource = new MediaUriSource(SphericalVideoPath);
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/Features.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/Features.cs
new file mode 100644 (file)
index 0000000..66a7588
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    internal static class Features
+    {
+        internal const string PrimaryCamera = "http://tizen.org/feature/camera";
+        internal const string SecondaryCamera = "http://tizen.org/feature/camera.front";
+        internal const string RawVideo = "http://tizen.org/feature/multimedia.raw_video";
+
+        internal const string AudioEffect = "http://tizen.org/feature/multimedia.custom_audio_effect";
+        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";
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerNetworkConnection.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerNetworkConnection.cs
new file mode 100644 (file)
index 0000000..e2f82e0
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.System;
+using System;
+using Tizen.Network.Connection;
+using Tizen.Network.WiFi;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    internal static class NetworkConncetion
+    {
+        private static bool IsSupportable
+        {
+            get
+            {
+                Information.TryGetValue("http://tizen.org/feature/network.wifi", out bool isWiFiSupported);
+                Information.TryGetValue("http://tizen.org/feature/network.telephony", out bool isTelephonySupported);
+                Information.TryGetValue("http://tizen.org/feature/network.ethernet", out bool isEthernetSupported);
+
+                LogUtils.Write(LogUtils.INFO, LogUtils.TAG,
+                    $"Wifi:{isWiFiSupported}, Telephony:{isTelephonySupported}, Ethernet:{isEthernetSupported}");
+
+                return isWiFiSupported | isTelephonySupported | isEthernetSupported;
+            }
+        }
+
+        public static void Check()
+        {
+            if (!IsSupportable)
+            {
+                Assert.Fail("Networks are not supported.");
+            }
+
+            if (ConnectionState.Connected == ConnectionManager.WiFiState)
+            {
+                WiFiAP WifiAp = WiFiManager.GetConnectedAP();
+                if (WifiAp != null)
+                {
+                    LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "WifiAp : " + WifiAp.NetworkInformation.Essid.ToString());
+                    WifiAp.Dispose();
+                }
+
+                try
+                {
+                    var data = ConnectionManager.GetStatistics(ConnectionType.WiFi, StatisticsType.TotalReceivedData);
+                    LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "TotalReceivedData : " + data);
+                    if (data == 0)
+                        Assert.Fail("TotalReceivedData should not be 0.");
+                }
+                catch (Exception ex)
+                {
+                    Assert.Fail("Failed to get connection statistics. : " + ex.ToString());
+                }
+            }
+            else
+            {
+                LogUtils.Write(LogUtils.INFO, LogUtils.TAG, "Wifi is not connected. Maybe another network is being used.");
+            }
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerPreconditionUtil.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerPreconditionUtil.cs
new file mode 100644 (file)
index 0000000..2a0969b
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using NUnit.Framework.TUnit;
+using System;
+using System.IO;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    public class MediaPlayerPreconditionUtils
+    {
+        public static string STREAMING_URI = null;
+        public static string ADAPTIVE_STREAMING_URI = null;
+
+        public static void SetPrecondition()
+        {
+            string result = ReadFile("/opt/usr/home/owner/share/tct/preconfigure.json");
+            int index = 0;
+            string[] resultArray = StringParser(result);
+
+            if (resultArray == null)
+            {
+                LogUtils.Write(LogUtils.ERROR, LogUtils.TAG, "StringParser failed " + result);
+                return;
+            }
+
+            foreach (string item in resultArray)
+            {
+                switch (item)
+                {
+                    case "STREAMING_URI":
+                        // Remove backslash
+                        resultArray[index + 1] = resultArray[index + 1].Replace("\\", "");
+                        STREAMING_URI = resultArray[index + 1];
+                        break;
+                    case "ADAPTIVE_STREAMING_URL":
+                        resultArray[index + 1] = resultArray[index + 1].Replace("\\", "");
+                        ADAPTIVE_STREAMING_URI = resultArray[index + 1];
+                        break;
+                    default:
+                        break;
+                }
+                index++;
+            }
+        }
+
+        private static string ReadFile(string path)
+        {
+            string result = null;
+            string url = path;
+            StreamReader reader = null;
+
+            try
+            {
+                reader = File.OpenText(path);
+                result = reader.ReadToEnd();
+            }
+            catch (Exception e)
+            {
+                LogUtils.Write(LogUtils.ERROR, LogUtils.TAG, "File read error : " + e.Message);
+            }
+            finally
+            {
+                if (reader != null)
+                {
+                    reader.Dispose();
+                }
+            }
+            return result;
+        }
+        private static string[] StringParser(string TCID)
+        {
+            TCID = TCID.Replace(": \"", ":\"");
+            TCID = TCID.Replace("    ", "");
+            TCID = TCID.Replace("\n", "");
+            TCID = TCID.Replace("\n", "");
+
+            string[] delimiter = { "[{\"", "\":\"", "\",\"", "\":", ",\"", "\"}]", "}" };
+            string[] stringPieces = null;
+
+            try
+            {
+                stringPieces = TCID.Split(delimiter, StringSplitOptions.None);
+            }
+            catch (Exception e)
+            {
+                LogUtils.Write(LogUtils.ERROR, LogUtils.TAG, "ResultParser : " + e.Message);
+            }
+
+            return stringPieces;
+        }
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerTestBase.cs b/tct-suite-vs/Tizen.Multimedia.UI.Tests/testcase/support/MediaPlayerTestBase.cs
new file mode 100644 (file)
index 0000000..e84b2b3
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using ElmSharp;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using System;
+using System.Threading.Tasks;
+
+namespace Tizen.Multimedia.UI.Tests
+{
+    public class MediaPlayerTestBase
+    {
+        public Player TestPlayer { get; private set; }
+
+        [SetUp]
+        public void SetUpBase()
+        {
+            TestPlayer = new Player();
+        }
+
+        [TearDown]
+        public void TearDownBase()
+        {
+            TestPlayer.Dispose();
+        }
+
+        protected Player GetIdlePlayer()
+        {
+            TestPlayer.Unprepare();
+
+            return TestPlayer;
+        }
+
+        internal async Task PreparePlayerAsync()
+        {
+            PlayerError? error = null;
+
+            EventHandler<PlayerErrorOccurredEventArgs> errorHandler = (s, e) => error = e.Error;
+
+            TestPlayer.ErrorOccurred += errorHandler;
+
+            try
+            {
+                await TestPlayer.PrepareAsync();
+            }
+            catch
+            {
+                if (error != null)
+                {
+                    string msg = $"Failed to prepare the player. Error : { error }.";
+
+                    LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, msg);
+                    throw new Exception(msg);
+                }
+                throw;
+            }
+            finally
+            {
+                TestPlayer.ErrorOccurred -= errorHandler;
+            }
+        }
+
+        protected async Task<Player> GetPreparedPlayer(MediaSource source = null, Display display = null)
+        {
+            // reset source
+            TestPlayer.SetSource(null);
+
+            TestPlayer.SetSource(source ?? Constants.AudioFileSource);
+            TestPlayer.Display = display;
+
+            await PreparePlayerAsync();
+
+            return TestPlayer;
+        }
+
+        protected async Task<Player> GetPlayingPlayer(MediaSource source = null, Display display = null)
+        {
+            await GetPreparedPlayer(source, display);
+
+            TestPlayer.Start();
+
+            return TestPlayer;
+        }
+
+        protected async Task<Player> GetPausedPlayer(MediaSource source = null, Display display = null)
+        {
+            await GetPlayingPlayer(source, display);
+
+            TestPlayer.Pause();
+
+            return TestPlayer;
+        }
+
+        internal static Window CreateWindow()
+        {
+            var w = new Window("");
+            w.Resize(100, 100);
+            w.Realize(null);
+            return w;
+        }
+
+        public static Display DefaultDisplay = new Display(CreateWindow());
+    }
+}
diff --git a/tct-suite-vs/Tizen.Multimedia.UI.Tests/tizen-manifest.xml b/tct-suite-vs/Tizen.Multimedia.UI.Tests/tizen-manifest.xml
new file mode 100644 (file)
index 0000000..ad9ed96
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="8" package="Tizen.Multimedia.UI.Tests" version="1.0.0">
+    <profile name="common" />
+    <ui-application appid="Tizen.Multimedia.UI.Tests"
+                    exec="Tizen.Multimedia.UI.Tests.dll"
+                    type="dotnet"
+                    multiple="false"
+                    taskmanage="true"
+                    launch_mode="single">
+    <icon>Tizen.Multimedia.UI.Tests.png</icon>
+    <label>Tizen.Multimedia.UI.Tests</label>
+    </ui-application>
+    <privileges>
+        <privilege>http://tizen.org/privilege/internet</privilege>
+        <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
+        <privilege>http://tizen.org/privilege/network.get</privilege>
+    </privileges>
+</manifest>
index 3a23271..13dfa59 100755 (executable)
@@ -54,3 +54,8 @@ MESSAGES_MOBILE_NUMBER=You should write only number. Do NOT write - or ()
 [Tizen.MediaPlayer.Tests]
 STREAMING_URI = set the uri in here. ex>http://www.samsung.com/xx/xx/aa.mp4
 ADAPTIVE_STREAMING_URL = set the url in here
+
+# Multimedia.UI test key settings
+[Tizen.Multimedia.UI.Tests]
+STREAMING_URI = set the uri in here. ex>http://www.samsung.com/xx/xx/aa.mp4
+ADAPTIVE_STREAMING_URL = set the url in here
index 8963046..b1fe4a2 100755 (executable)
@@ -114,7 +114,7 @@ The tct-bt-helper is included in the tct-bluetooth-tizen-tests package. Install
     </set>
     <set name="Tizen.Maps.Tests">
       <testcase component="WebAPI/Tizen/configuration" execution_type="manual" id="Mapsconfiguration" purpose="Tizen.Maps.Tests configuration">
-        <description>          
+        <description>
           <steps>
             <step order="1">
               <step_desc>A network connection capable of accessing the Internet MUST be established.</step_desc>
@@ -379,7 +379,24 @@ The tct-bt-helper is included in the tct-bluetooth-tizen-tests package. Install
           <test_script_entry test_script_expected_result="0" timeout="90"/>
         </description>
       </testcase>
-    </set>
+   </set>
+
+   <set name="Tizen.Multimedia.UI.Tests">
+      <testcase component="WebAPI/Tizen/configuration" execution_type="manual" id="MultimediaUIconfiguration" purpose="Tizen.Multimedia.UI.Tests configuration">
+        <description>
+          <steps>
+            <step order="1">
+              <step_desc> Set the streaming uri such as http://www.samsung.com/xx/xx/aa.mp4.</step_desc>
+            </step>
+        <step order="2">
+              <step_desc> Set the adaptive streaming url.</step_desc>
+            </step>
+          </steps>
+          <test_script_entry test_script_expected_result="0" timeout="90"/>
+        </description>
+      </testcase>
+   </set>
+
 
    <set name="Tizen.WebView.Tests">
       <testcase component="WebAPI/Tizen/configuration" execution_type="manual" id="WebViewconfiguration" purpose="Tizen.WebView.Tests configuration">