[TearDown]
public void TearDown()
{
- MediaControlServer.Stop();
+ if (MediaControlServer.IsRunning)
+ {
+ MediaControlServer.Stop();
+ }
}
[Test]
[Category("P1")]
- [Description("Does not throw even if start again")]
+ [Description("Test Start method and check its state.")]
[Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.Start M")]
[Property("SPEC_URL", "-")]
- [Property("CRITERIA", "MR")]
+ [Property("CRITERIA", "MCST")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Start_CHANGE_STATUS()
+ {
+ MediaControlServer.Stop();
+ Assert.That(MediaControlServer.IsRunning, Is.False);
+
+ MediaControlServer.Start();
+ Assert.That(MediaControlServer.IsRunning, Is.True);
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Throws exception if start again")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.Start M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
public void Start_TWICE()
{
- Assert.That(() => MediaControlServer.Start(), Throws.Nothing);
+ Assert.That(() => MediaControlServer.Start(), Throws.ArgumentException);
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Test Stop method and check its state.")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.Stop M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void Stop_CHANGE_STATUS()
+ {
+ Assert.That(MediaControlServer.IsRunning, Is.True);
+
+ MediaControlServer.Stop();
+ Assert.That(MediaControlServer.IsRunning, Is.False);
}
[Test]
[Test]
[Category("P2")]
- [Description("Does not throw if the arg is null")]
+ [Description("Throws exception if the argument is null")]
[Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.SetMetadata M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
+using System;
using NUnit.Framework;
using System.Threading.Tasks;
using Tizen.Applications;
{
[Test]
[Category("P1")]
- [Description("Does not throw")]
+ [Description("Create MediaControllerManager instance")]
[Property("SPEC", "Tizen.Multimedia.Remoting.MediaControllerManager.MediaControllerManager C")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "CONSTR")]
[Property("AUTHOR", "JungHo Kim, jhyo.kim@samsung.com")]
public void MediaControllerManager_CHECK_CREATE_CONSTRUCTOR()
{
- Assert.That(() => new MediaControllerManager(), Throws.Nothing);
+ using (var mediaControllerManager = new MediaControllerManager())
+ {
+ Assert.IsNotNull(mediaControllerManager, "Object should not be null after initializing");
+ Assert.IsInstanceOf<MediaControllerManager>(mediaControllerManager,
+ "Should return mediaControllerManager instance");
+ }
}
[Test]