foreach (Rotation rotation in Enum.GetValues(typeof(Rotation)))
{
MediaControlServer.SetDisplayRotationCapability(rotation, MediaControlCapabilitySupport.Supported);
- Assert.That(controller.GetDisplayRotationapability().Contains(rotation), "Should be same value.");
+ Assert.That(controller.GetDisplayRotationCapability().Contains(rotation), "Should be same value.");
}
}
}
Assert.That(() => MediaControlServer.SetDisplayRotationCapabilities(setRotationsDict), Throws.Nothing);
- var supportedRotations = controller.GetDisplayRotationapability();
+ var supportedRotations = controller.GetDisplayRotationCapability();
Assert.That(supportedRotations.Count(), Is.EqualTo(setRotations.Count), "Should be same value.");
foreach (var rotation in supportedRotations)
[Test]
[Category("P1")]
+ [Description("Sets 360 mode capability")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.SetMode360Capability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void SetMode360Capability_RETURN_VALUE()
+ {
+ using (var manager = new MediaControllerManager())
+ {
+ var controller = manager.GetActiveControllers().Single(
+ c => c.ServerAppId == Application.Current.ApplicationInfo.ApplicationId);
+
+ MediaControlServer.SetMode360Capability(MediaControlCapabilitySupport.NotSupported);
+ Assert.That(controller.GetMode360Capability(), Is.EqualTo(MediaControlCapabilitySupport.NotSupported),
+ "Should be same value");
+
+ MediaControlServer.SetMode360Capability(MediaControlCapabilitySupport.Supported);
+ Assert.That(controller.GetMode360Capability(), Is.EqualTo(MediaControlCapabilitySupport.Supported),
+ "Should be same value");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether SetMode360Capability throws exception if parameter is invalid")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.SetMode360Capability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void SetMode360Capability_THROWS_IF_PARAM_IS_INVALID()
+ {
+ Assert.Throws<ArgumentException>(() =>
+ MediaControlServer.SetMode360Capability(MediaControlCapabilitySupport.Supported - 1));
+
+ Assert.Throws<ArgumentException>(() =>
+ MediaControlServer.SetMode360Capability(MediaControlCapabilitySupport.NotDecided));
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether SetMode360Capability throws exception if server is not running")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.SetMode360Capability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void SetMode360Capability_THROWS_SERVER_IS_NOT_RUNNING()
+ {
+ if (MediaControlServer.IsRunning)
+ {
+ MediaControlServer.Stop();
+ }
+
+ Assert.Throws<InvalidOperationException>(() => MediaControlServer.SetMode360Capability(
+ MediaControlCapabilitySupport.Supported));
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Sets subtitle mode capability")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.SetSubtitleModeCapability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void SetSubtitleModeCapability_RETURN_VALUE()
+ {
+ using (var manager = new MediaControllerManager())
+ {
+ var controller = manager.GetActiveControllers().Single(
+ c => c.ServerAppId == Application.Current.ApplicationInfo.ApplicationId);
+
+ MediaControlServer.SetSubtitleModeCapability(MediaControlCapabilitySupport.NotSupported);
+ Assert.That(controller.GetSubtitleModeCapability(), Is.EqualTo(MediaControlCapabilitySupport.NotSupported),
+ "Should be same value");
+
+ MediaControlServer.SetSubtitleModeCapability(MediaControlCapabilitySupport.Supported);
+ Assert.That(controller.GetSubtitleModeCapability(), Is.EqualTo(MediaControlCapabilitySupport.Supported),
+ "Should be same value");
+ }
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether SetSubtitleModeCapability throws exception if parameter is invalid")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.SetSubtitleModeCapability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void SetSubtitleModeCapability_THROWS_IF_PARAM_IS_INVALID()
+ {
+ Assert.Throws<ArgumentException>(() =>
+ MediaControlServer.SetSubtitleModeCapability(MediaControlCapabilitySupport.Supported - 1));
+
+ Assert.Throws<ArgumentException>(() =>
+ MediaControlServer.SetSubtitleModeCapability(MediaControlCapabilitySupport.NotDecided));
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether SetSubtitleModeCapability throws exception if server is not running")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.SetSubtitleModeCapability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void SetSubtitleModeCapability_THROWS_SERVER_IS_NOT_RUNNING()
+ {
+ if (MediaControlServer.IsRunning)
+ {
+ MediaControlServer.Stop();
+ }
+
+ Assert.Throws<InvalidOperationException>(() => MediaControlServer.SetSubtitleModeCapability(
+ MediaControlCapabilitySupport.Supported));
+ }
+
+ [Test]
+ [Category("P1")]
[Description("Invoked when server sends custom command")]
[Property("SPEC", "Tizen.Multimedia.Remoting.MediaControlServer.CustomCommandReceived E")]
[Property("SPEC_URL", "-")]
[Test]
[Category("P1")]
[Description("Gets display rotation capabilities")]
- [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetDisplayRotationapability M")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetDisplayRotationCapability M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MR")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void GetDisplayRotationapability_RETURN_VALUE()
+ public void GetDisplayRotationCapability_RETURN_VALUE()
{
var setRotations = new List<Rotation>()
{
Assert.That(() => MediaControlServer.SetDisplayRotationCapabilities(setRotationsDict), Throws.Nothing);
- var supportedRotations = _controller.GetDisplayRotationapability();
+ var supportedRotations = _controller.GetDisplayRotationCapability();
Assert.That(supportedRotations.Count(), Is.EqualTo(setRotations.Count), "Should be same value.");
foreach (var rotation in supportedRotations)
[Test]
[Category("P2")]
- [Description("Check whether GetDisplayRotationapability throws exception if parameter is invalid")]
- [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetDisplayRotationapability M")]
+ [Description("Check whether GetDisplayRotationCapability throws exception if parameter is invalid")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetDisplayRotationCapability M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void GetDisplayRotationapability_OBJECT_IS_DISPOSED()
+ public void GetDisplayRotationCapability_OBJECT_IS_DISPOSED()
{
_manager.Dispose();
- Assert.Throws<ObjectDisposedException>(() => _controller.GetDisplayRotationapability());
+ Assert.Throws<ObjectDisposedException>(() => _controller.GetDisplayRotationCapability());
}
[Test]
[Category("P2")]
- [Description("Check whether GetDisplayRotationapability throws exception if server has already benn stopped")]
- [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetDisplayRotationapability M")]
+ [Description("Check whether GetDisplayRotationCapability throws exception if server has already benn stopped")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetDisplayRotationCapability M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public async Task GetDisplayRotationapability_THROWS_SERVER_IS_ALREADY_STOPPED()
+ public async Task GetDisplayRotationCapability_THROWS_SERVER_IS_ALREADY_STOPPED()
{
using (var eventWaiter = EventAwaiter<MediaControlServerStoppedEventArgs>.Create())
{
await eventWaiter.IsRaisedAsync();
- Assert.Throws<InvalidOperationException>(() => _controller.GetDisplayRotationapability());
+ Assert.Throws<InvalidOperationException>(() => _controller.GetDisplayRotationCapability());
+
+ _manager.ServerStopped -= eventWaiter;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Sets 360 mode capability and compare it with the value previously set")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetMode360Capability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetMode360Capability_RETURN_VALUE()
+ {
+ MediaControlServer.SetMode360Capability(MediaControlCapabilitySupport.NotSupported);
+ Assert.That(_controller.GetMode360Capability(), Is.EqualTo(MediaControlCapabilitySupport.NotSupported),
+ "Should be same value");
+
+ MediaControlServer.SetMode360Capability(MediaControlCapabilitySupport.Supported);
+ Assert.That(_controller.GetMode360Capability(), Is.EqualTo(MediaControlCapabilitySupport.Supported),
+ "Should be same value");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether GetMode360Capability throws exception if parameter is invalid")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetMode360Capability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetMode360Capability_OBJECT_IS_DISPOSED()
+ {
+ _manager.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _controller.GetMode360Capability());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether GetMode360Capability throws exception if server has already benn stopped")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetMode360Capability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public async Task GetMode360Capability_THROWS_SERVER_IS_ALREADY_STOPPED()
+ {
+ using (var eventWaiter = EventAwaiter<MediaControlServerStoppedEventArgs>.Create())
+ {
+ _manager.ServerStopped += eventWaiter;
+
+ MediaControlServer.Stop();
+
+ await eventWaiter.IsRaisedAsync();
+
+ Assert.Throws<InvalidOperationException>(() => _controller.GetMode360Capability());
+
+ _manager.ServerStopped -= eventWaiter;
+ }
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("Sets subtitle mode capability and compare it with the value previously set")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetSubtitleModeCapability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MR")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetSubtitleModeCapability_RETURN_VALUE()
+ {
+ MediaControlServer.SetSubtitleModeCapability(MediaControlCapabilitySupport.NotSupported);
+ Assert.That(_controller.GetSubtitleModeCapability(), Is.EqualTo(MediaControlCapabilitySupport.NotSupported),
+ "Should be same value");
+
+ MediaControlServer.SetSubtitleModeCapability(MediaControlCapabilitySupport.Supported);
+ Assert.That(_controller.GetSubtitleModeCapability(), Is.EqualTo(MediaControlCapabilitySupport.Supported),
+ "Should be same value");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether GetSubtitleModeCapability throws exception if parameter is invalid")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetSubtitleModeCapability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void GetSubtitleModeCapability_OBJECT_IS_DISPOSED()
+ {
+ _manager.Dispose();
+
+ Assert.Throws<ObjectDisposedException>(() => _controller.GetSubtitleModeCapability());
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Check whether GetSubtitleModeCapability throws exception if server has already benn stopped")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaController.GetSubtitleModeCapability M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public async Task GetSubtitleModeCapability_THROWS_SERVER_IS_ALREADY_STOPPED()
+ {
+ using (var eventWaiter = EventAwaiter<MediaControlServerStoppedEventArgs>.Create())
+ {
+ _manager.ServerStopped += eventWaiter;
+
+ MediaControlServer.Stop();
+
+ await eventWaiter.IsRaisedAsync();
+
+ Assert.Throws<InvalidOperationException>(() => _controller.GetSubtitleModeCapability());
_manager.ServerStopped -= eventWaiter;
}