[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")]
[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);
}
[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));
}
[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)
[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")]
{
player.BufferingProgressChanged += eventWaiter;
- player.SetSource(Constants.StreamingSource);
+ player.SetSource(StreamingSource);
player.PrepareAsync();
//[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();
[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();
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;
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);
-
}
using System;
using System.IO;
-namespace PreconditionUtils
+namespace Tizen.Multimedia.Tests
{
public class PreconditionUtils
{
if (video)
{
yield return Constants.VideoFileSource;
- yield return Constants.StreamingSource;
yield return new MediaBufferSource(File.ReadAllBytes(Constants.VideoFilePath));
}
yield return new MediaBufferSource(File.ReadAllBytes(Constants.AudioFilePath));
}
}
-}
\ No newline at end of file
+}