From: Haesu Gwon Date: Fri, 28 Sep 2018 06:12:20 +0000 (+0900) Subject: [MediaController][TCSACR-186][Add new APIs for event and capabilities.] X-Git-Tag: tct5.0_m2~45^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f36b0ab29c3956d83fef589adc194c933ea52f43;p=test%2Ftct%2Fcsharp%2Fapi.git [MediaController][TCSACR-186][Add new APIs for event and capabilities.] Change-Id: Ib0794faa18db580f2fa7836430f0eee118384039 --- diff --git a/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSMediaControlSearchCondition.cs b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSMediaControlSearchCondition.cs new file mode 100644 index 0000000..291c050 --- /dev/null +++ b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSMediaControlSearchCondition.cs @@ -0,0 +1,118 @@ +using NUnit.Framework; +using System.Linq; +using System.Collections.Generic; +using System.Threading.Tasks; +using Tizen.Applications; + +namespace Tizen.Multimedia.Remoting.Tests +{ + [TestFixture] + [Description("Testing Tizen.Multimedia.Remoting.MediaControlSearchCondition class")] + public class MediaControlSearchConditionTests + { + private MediaController _controller; + private MediaControllerManager _manager; + private MediaControlSearchCondition _condition; + + [SetUp] + public void SetUp() + { + MediaControlServer.Start(); + + _manager = new MediaControllerManager(); + _controller = _manager.GetActiveControllers().Single( + c => c.ServerAppId == Application.Current.ApplicationInfo.ApplicationId); + _condition = new MediaControlSearchCondition(MediaControlContentType.Image, + MediaControlSearchCategory.Artist, "GD", new Bundle()); + } + + [TearDown] + public void TearDown() + { + if (MediaControlServer.IsRunning) + { + MediaControlServer.Stop(); + } + + _manager.Dispose(); + } + + [Test] + [Category("P1")] + [Description("Create MediaControlSearchCondition instance")] + [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlSearchCondition.MediaControlSearchCondition C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "MediaControlContentType, MediaControlSearchCategory, string, Bundle")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void MediaControlSearchCondition_CHECK_CREATE_CONSTRUCTOR() + { + Assert.IsNotNull(_condition, "Object should not be null after initializing"); + Assert.IsInstanceOf(_condition, "Should return MediaControlSearchCondition instance"); + } + + [Test] + [Category("P1")] + [Description("Create MediaControlSearchCondition instance")] + [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlSearchCondition.MediaControlSearchCondition C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("COVPARAM", "MediaControlContentType, string, Bundle")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void MediaControlSearchCondition_CHECK_CREATE_CONSTRUCTOR_WITH_ALL_CATEGORY() + { + var condition = new MediaControlSearchCondition(MediaControlContentType.Image, "GD", null); + + Assert.IsNotNull(condition, "Object should not be null after initializing"); + Assert.IsInstanceOf(condition, "Should return MediaControlSearchCondition instance"); + } + + [Test] + [Category("P1")] + [Description("Is always not null")] + [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlSearchCondition.ContentType A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void ContentType_READ_ONLY() + { + Assert.That(() => _condition.ContentType, Is.Not.Null); + } + + [Test] + [Category("P1")] + [Description("Is always not null")] + [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlSearchCondition.Category A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void Category_READ_ONLY() + { + Assert.That(() => _condition.Category, Is.Not.Null); + } + + [Test] + [Category("P1")] + [Description("Is always not null")] + [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlSearchCondition.Keyword A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void Keyword_READ_ONLY() + { + Assert.That(() => _condition.Keyword, Is.Not.Null); + } + + [Test] + [Category("P1")] + [Description("Is always not null")] + [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlSearchCondition.Bundle A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void Bundle_READ_ONLY() + { + Assert.That(() => _condition.Bundle, Is.Not.Null); + } + } +} diff --git a/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSPlaybackCapabilityUpdatedEventArgs.cs b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSPlaybackCapabilityUpdatedEventArgs.cs new file mode 100644 index 0000000..297de4a --- /dev/null +++ b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSPlaybackCapabilityUpdatedEventArgs.cs @@ -0,0 +1,42 @@ +using NUnit.Framework; +using System.Collections.Generic; + +namespace Tizen.Multimedia.Remoting.Tests +{ + [TestFixture] + [Description("Testing Tizen.Multimedia.Remoting.PlaybackCapabilityUpdatedEventArgs class")] + public class PlaybackCapabilityUpdatedEventArgsTests + { + Dictionary _capabilities = + new Dictionary() + { + { MediaControlPlaybackCommand.FastForward, MediaControlCapabilitySupport.NotSupported }, + { MediaControlPlaybackCommand.Next, MediaControlCapabilitySupport.NotSupported} + }; + + [Test] + [Category("P1")] + [Description("Constructor")] + [Property("SPEC", "Tizen.Multimedia.Remoting.PlaybackCapabilityUpdatedEventArgs.PlaybackCapabilityUpdatedEventArgs C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void PlaybackCapabilityUpdatedEventArgs_CONSTRUCTOR() + { + Assert.That(() => new PlaybackCapabilityUpdatedEventArgs(_capabilities), Throws.Nothing); + } + + [Test] + [Category("P1")] + [Description("Is always not null")] + [Property("SPEC", "Tizen.Multimedia.Remoting.PlaybackCapabilityUpdatedEventArgs.Support A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void Support_READ_ONLY() + { + Assert.That(() => new PlaybackActionCommandReceivedEventArgs( + new PlaybackCommand(MediaControlPlaybackCommand.Play)).Command, Is.Not.Null); + } + } +} diff --git a/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSRepeatModeCapabilityUpdatedEventArgs.cs b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSRepeatModeCapabilityUpdatedEventArgs.cs new file mode 100644 index 0000000..5b59c75 --- /dev/null +++ b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSRepeatModeCapabilityUpdatedEventArgs.cs @@ -0,0 +1,34 @@ +using NUnit.Framework; +using System.Collections.Generic; + +namespace Tizen.Multimedia.Remoting.Tests +{ + [TestFixture] + [Description("Testing Tizen.Multimedia.Remoting.RepeatModeCapabilityUpdatedEventArgs class")] + public class RepeatModeCapabilityUpdatedEventArgsTests + { + [Test] + [Category("P1")] + [Description("Constructor")] + [Property("SPEC", "Tizen.Multimedia.Remoting.RepeatModeCapabilityUpdatedEventArgs.RepeatModeCapabilityUpdatedEventArgs C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void RepeatModeCapabilityUpdatedEventArgs_CONSTRUCTOR() + { + Assert.That(() => new RepeatModeCapabilityUpdatedEventArgs(MediaControlCapabilitySupport.NotSupported), Throws.Nothing); + } + + [Test] + [Category("P1")] + [Description("Is always not null")] + [Property("SPEC", "Tizen.Multimedia.Remoting.RepeatModeCapabilityUpdatedEventArgs.Support A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void Support_READ_ONLY() + { + Assert.That(() => new RepeatModeCapabilityUpdatedEventArgs(MediaControlCapabilitySupport.NotSupported).Support, Is.Not.Null); + } + } +} diff --git a/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSSearchCommandReceivedEventArgs.cs b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSSearchCommandReceivedEventArgs.cs new file mode 100644 index 0000000..ed4e31e --- /dev/null +++ b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSSearchCommandReceivedEventArgs.cs @@ -0,0 +1,36 @@ +using NUnit.Framework; + +namespace Tizen.Multimedia.Remoting.Tests +{ + [TestFixture] + [Description("Testing Tizen.Multimedia.Remoting.SearchCommandReceivedEventArgs class")] + public class SearchCommandReceivedEventArgsTests + { + private MediaControlSearchCondition _searchCondition = + new MediaControlSearchCondition(MediaControlContentType.Image, "image", null); + [Test] + [Category("P1")] + [Description("Constructor")] + [Property("SPEC", "Tizen.Multimedia.Remoting.SearchCommandReceivedEventArgs.SearchCommandReceivedEventArgs C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void SearchCommandReceivedEventArgs_CONSTRUCTOR() + { + Assert.That(() => new SearchCommandReceivedEventArgs(new SearchCommand(_searchCondition)), Throws.Nothing); + } + + [Test] + [Category("P1")] + [Description("Is always not null")] + [Property("SPEC", "Tizen.Multimedia.Remoting.SearchCommandReceivedEventArgs.Command A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void Command_READ_ONLY() + { + Assert.That(() => new SearchCommandReceivedEventArgs(new SearchCommand(_searchCondition)).Command, + Is.Not.Null); + } + } +} diff --git a/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSShuffleModeCapabilityUpdatedEventArgs.cs b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSShuffleModeCapabilityUpdatedEventArgs.cs new file mode 100644 index 0000000..7d83a92 --- /dev/null +++ b/tct-suite-vs/Tizen.MediaController.Tests/testcase/TSShuffleModeCapabilityUpdatedEventArgs.cs @@ -0,0 +1,35 @@ +using NUnit.Framework; + +namespace Tizen.Multimedia.Remoting.Tests +{ + [TestFixture] + [Description("Testing Tizen.Multimedia.Remoting.ShuffleModeCapabilityUpdatedEventArgs class")] + public class ShuffleModeCapabilityUpdatedEventArgsTests + { + [Test] + [Category("P1")] + [Description("Constructor")] + [Property("SPEC", "Tizen.Multimedia.Remoting.ShuffleModeCapabilityUpdatedEventArgs.ShuffleModeCapabilityUpdatedEventArgs C")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "CONSTR")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void ShuffleModeCapabilityUpdatedEventArgs_CONSTRUCTOR() + { + Assert.That(() => new ShuffleModeCapabilityUpdatedEventArgs(MediaControlCapabilitySupport.NotSupported), + Throws.Nothing); + } + + [Test] + [Category("P1")] + [Description("Is always not null")] + [Property("SPEC", "Tizen.Multimedia.Remoting.ShuffleModeCapabilityUpdatedEventArgs.Support A")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "PRO")] + [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")] + public void Support_READ_ONLY() + { + Assert.That(() => new ShuffleModeCapabilityUpdatedEventArgs(MediaControlCapabilitySupport.NotSupported).Support, + Is.Not.Null); + } + } +}