[MediaPlayer][Non-ACR] fix to use user input for streaming test 14/181314/3
authornam <just.nam@samsung.com>
Tue, 12 Jun 2018 04:37:12 +0000 (13:37 +0900)
committernam <just.nam@samsung.com>
Tue, 12 Jun 2018 04:45:24 +0000 (13:45 +0900)
Change-Id: I52554aefddc6c7aabae4d37ba4372354faffabc2

tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSDownloadProgress.cs
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/TSPlayer.cs
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/support/Constants.cs
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/support/PreconditionUtil.cs
tct-suite-vs/Tizen.MediaPlayer.Tests/testcase/support/TestSources.cs

index 6d96930..458eb17 100755 (executable)
@@ -8,6 +8,13 @@ namespace Tizen.Multimedia.Tests
     [Description("Tizen.Multimedia.DownloadProgress Tests")]
     public class DownloadProgressTests : TestBase
     {
+        [OneTimeSetUp]
+        public static void Init()
+        {
+            PreconditionUtils.SetPrecondition();
+        }
+        internal static readonly MediaUriSource StreamingSource = new MediaUriSource(PreconditionUtils.STREAMING_URI);
+
         [Test]
         [Category("P1")]
         [Description("Constructor test")]
@@ -29,7 +36,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public async Task Start_CHECK_INIT()
         {
-            var player = await GetPlayingPlayer(Constants.StreamingSource);
+            var player = await GetPlayingPlayer(StreamingSource);
 
             Assert.That(player.GetDownloadProgress().Start, Is.Zero);
         }
@@ -43,11 +50,10 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public async Task Start_CHECK()
         {
-            var player = await GetPlayingPlayer(Constants.StreamingSource);
+            var player = await GetPlayingPlayer(StreamingSource);
 
             await player.SetPlayPositionAsync(Constants.StreamingVideoLength / 10, true);
             await Task.Delay(100);
-
             Assert.That(Math.Abs(player.GetDownloadProgress().Start - 10), Is.LessThanOrEqualTo(2));
         }
 
@@ -60,7 +66,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public async Task Current_CHECK()
         {
-            var player = await GetPlayingPlayer(Constants.StreamingSource);
+            var player = await GetPlayingPlayer(StreamingSource);
 
             bool currentNotZero = false;
             for (int tryConut = 0; tryConut < 10; ++tryConut)
index 52c7808..5cf677e 100644 (file)
@@ -11,6 +11,13 @@ namespace Tizen.Multimedia.Tests
     [Description("Tizen.Multimedia.Player tests")]
     public class PlayerTests : TestBase
     {
+        [OneTimeSetUp]
+        public static void Init()
+        {
+            PreconditionUtils.SetPrecondition();
+        }
+        internal static readonly MediaUriSource StreamingSource = new MediaUriSource(PreconditionUtils.STREAMING_URI);
+
         [Test]
         [Category("P1")]
         [Description("Player instantiation")]
@@ -594,7 +601,7 @@ namespace Tizen.Multimedia.Tests
             {
                 player.BufferingProgressChanged += eventWaiter;
 
-                player.SetSource(Constants.StreamingSource);
+                player.SetSource(StreamingSource);
 
                 player.PrepareAsync();
 
@@ -969,7 +976,7 @@ namespace Tizen.Multimedia.Tests
         //[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         //public async Task CaptureVideoAsync_RETURN_VIDEO_FRAME_WHEN_STREAMING()
         //{
-        //    IdlePlayer.SetSource(PlayerTestSupport.StreamingSource);
+        //    IdlePlayer.SetSource(StreamingSource);
         //    IdlePlayer.Display = new PlayerDisplay(PlayerTestSupport.CreateWindow());
         //    await IdlePlayer.PrepareAsync();
         //    IdlePlayer.Start();
@@ -1143,7 +1150,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
         public async Task GetDownloadProgress_CHECK()
         {
-            var player = await GetPreparedPlayer(Constants.StreamingSource);
+            var player = await GetPreparedPlayer(StreamingSource);
 
             player.Start();
 
index 8dd825c..a26094e 100755 (executable)
@@ -2,8 +2,6 @@ using Tizen.Multimedia;
 
 internal static class Constants
 {
-    private const string StreamingUrl = "http://content.bitsontherun.com/videos/ntPYsD4L-1ahmry41.mp4";
-
     internal const int StreamingVideoLength = 596000;
     internal const int AudioLength = 33384;
 
@@ -18,7 +16,5 @@ internal static class Constants
 
     internal static readonly MediaUriSource AudioFileSource = new MediaUriSource(AudioFilePath);
     internal static readonly MediaUriSource VideoFileSource = new MediaUriSource(VideoFilePath);
-    internal static readonly MediaUriSource StreamingSource = new MediaUriSource(StreamingUrl);
     internal static readonly MediaUriSource SphericalVideoSource = new MediaUriSource(SphericalVideoPath);
-
 }
index a3d8fd1..11e78f6 100644 (file)
@@ -18,7 +18,7 @@ using NUnit.Framework.TUnit;
 using System;
 using System.IO;
 
-namespace PreconditionUtils
+namespace Tizen.Multimedia.Tests
 {
     public class PreconditionUtils
     {
index ca3798f..c964bf4 100755 (executable)
@@ -15,7 +15,6 @@ public static class TestSources
         if (video)
         {
             yield return Constants.VideoFileSource;
-            yield return Constants.StreamingSource;
             yield return new MediaBufferSource(File.ReadAllBytes(Constants.VideoFilePath));
         }
 
@@ -25,4 +24,4 @@ public static class TestSources
             yield return new MediaBufferSource(File.ReadAllBytes(Constants.AudioFilePath));
         }
     }
-}
\ No newline at end of file
+}