[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void EnableAudioLoopback_THROWS_POLICY_IS_NULL()
+ public void EnableAudioLoopback_THROWS_IF_POLICY_IS_NULL()
{
var source = new MediaTestSource(MediaType.Audio);
_offerClient.AddSource(source);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void EnableAudioLoopback_THROWS_SOURCE_IS_NOT_AUDIO()
+ public void EnableAudioLoopback_THROWS_IF_SOURCE_IS_NOT_AUDIO()
{
var source = new MediaTestSource(MediaType.Video);
_offerClient.AddSource(source);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void EnableAudioLoopback_THROWS_POLICY_ALREADY_DISPOSED()
+ public void EnableAudioLoopback_THROWS_IF_POLICY_ALREADY_DISPOSED()
{
var source = new MediaTestSource(MediaType.Audio);
_offerClient.AddSource(source);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void EnableAudioLoopback_THROWS_WEBRTC_ALREADY_DISPOSED()
+ public void EnableAudioLoopback_THROWS_IF_WEBRTC_ALREADY_DISPOSED()
{
var source = new MediaTestSource(MediaType.Audio);
_offerClient.AddSource(source);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void EnableVideoLoopback_THROWS_DISPLAY_IS_ALREADY_ALLOCATED()
+ public void EnableVideoLoopback_THROWS_IF_DISPLAY_IS_ALREADY_ALLOCATED()
{
var source = new MediaTestSource(MediaType.Video);
var display = new Display(CreateWindow());
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void EnableVideoLoopback_THROWS_POLICY_IS_NULL()
+ public void EnableVideoLoopback_THROWS_IF_POLICY_IS_NULL()
{
var source = new MediaTestSource(MediaType.Video);
_offerClient.AddSource(source);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void EnableVideoLoopback_THROWS_SOURCE_IS_NOT_VIDEO()
+ public void EnableVideoLoopback_THROWS_IF_SOURCE_IS_NOT_VIDEO()
{
var source = new MediaTestSource(MediaType.Audio);
_offerClient.AddSource(source);
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
[Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
- public void EnableVideoLoopback_THROWS_ALREADY_DISPOSED()
+ public void EnableVideoLoopback_THROWS_IF_ALREADY_DISPOSED()
{
var source = new MediaTestSource(MediaType.Video);
_offerClient.AddSource(source);
}
[Test]
+ [Category("P2")]
+ [Description("Check EnableVideoLoopback whether throws NotSupportedException if display feature is not supported.")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaSource.EnableVideoLoopback M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void EnableVideoLoopback_THROWS_IF_NOT_SUPPORTED()
+ {
+ if (!FeatureChecker.IsSupported(Features.Display))
+ {
+ var source = new MediaTestSource(MediaType.Video);
+ _offerClient.AddSource(source);
+
+ Assert.That(() => source.EnableVideoLoopback(new Display(CreateWindow())),
+ Throws.TypeOf<NotSupportedException>(), "Should throw NotSupportedException");
+ }
+ else
+ {
+ Assert.Pass("display feature is supported. So this TC cannot be tested.");
+ }
+ }
+
+ [Test]
[Category("P1")]
[Description("Check whether EncoderBitrate returns expected value or not.")]
[Property("SPEC", "Tizen.Multimedia.Remoting.MediaSource.EncoderBitrate A")]
}
[Test]
+ [Category("P2")]
+ [Description("Check whether Display throw exception when display feature is not supported.")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaStreamTrack.Display A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public async Task Display_THROWS_IF_NOT_SUPPORTED()
+ {
+ var window = CreateWindow();
+
+ var tcsAnswerTrackAdded = new TaskCompletionSource<MediaStreamTrack>(TaskCreationOptions.RunContinuationsAsynchronously);
+
+ EventHandler<WebRTCTrackAddedEventArgs> eventHandler = (s, e) =>
+ tcsAnswerTrackAdded.TrySetResult(e.MediaStreamTrack);
+
+ _answerClient.TrackAdded += eventHandler;
+
+ try
+ {
+ _offerClient.AddSource(new MediaTestSource(MediaType.Video));
+
+ await ConnectPeerAsync(_offerClient, _answerClient);
+
+ var mediaStreamTrack = await tcsAnswerTrackAdded.Task;
+
+ if (!FeatureChecker.IsSupported(Features.Display))
+ {
+ Assert.That(() => mediaStreamTrack.Display = new Display(window), Throws.TypeOf<NotSupportedException>(),
+ "Should throw NotSupportedException");
+
+ await Task.Delay(1000);
+ }
+ else
+ {
+ Assert.Pass("display feature is supported. So this TC cannot be tested.");
+ }
+ }
+ finally
+ {
+ _answerClient.TrackAdded -= eventHandler;
+ }
+ }
+
+ [Test]
[Category("P1")]
[Description("Check whether DisplayMode returns expected value or not.")]
[Property("SPEC", "Tizen.Multimedia.Remoting.MediaStreamTrack.DisplayMode A")]
[Test]
[Category("P2")]
+ [Description("Check whether DisplayMode throws exception when display feature is not supported.")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaStreamTrack.DisplayMode A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public async Task DisplayMode_THROWS_IF_NOT_SUPPORTED()
+ {
+ var tcsAnswerTrackAdded = new TaskCompletionSource<MediaStreamTrack>(TaskCreationOptions.RunContinuationsAsynchronously);
+
+ EventHandler<WebRTCTrackAddedEventArgs> eventHandler = (s, e) =>
+ tcsAnswerTrackAdded.TrySetResult(e.MediaStreamTrack);
+
+ _answerClient.TrackAdded += eventHandler;
+
+ try
+ {
+ _offerClient.AddSource(new MediaTestSource(MediaType.Audio));
+
+ await ConnectPeerAsync(_offerClient, _answerClient);
+
+ var track = await tcsAnswerTrackAdded.Task;
+
+ if (!FeatureChecker.IsSupported(Features.Display))
+ {
+ Assert.That(() => track.DisplayMode = WebRTCDisplayMode.OriginSize, Throws.TypeOf<NotSupportedException>(),
+ "Should throw NotSupportedException");
+
+ await Task.Delay(1000);
+ }
+ else
+ {
+ Assert.Pass("display feature is supported. So this TC cannot be tested.");
+ }
+ }
+ finally
+ {
+ _answerClient.TrackAdded -= eventHandler;
+ }
+ }
+
+ [Test]
+ [Category("P2")]
[Description("Check whether DisplayVisible throws exception when Display property is not set.")]
[Property("SPEC", "Tizen.Multimedia.Remoting.MediaStreamTrack.DisplayVisible A")]
[Property("SPEC_URL", "-")]
}
[Test]
+ [Category("P2")]
+ [Description("Check whether DisplayVisible throws exception when display feature is not supported.")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.MediaStreamTrack.DisplayVisible A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "PEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public async Task DisplayVisible_THROWS_IF_NOT_SUPPORTED()
+ {
+ var tcsAnswerTrackAdded = new TaskCompletionSource<MediaStreamTrack>(TaskCreationOptions.RunContinuationsAsynchronously);
+
+ EventHandler<WebRTCTrackAddedEventArgs> eventHandler = (s, e) =>
+ tcsAnswerTrackAdded.TrySetResult(e.MediaStreamTrack);
+
+ _answerClient.TrackAdded += eventHandler;
+
+ try
+ {
+ _offerClient.AddSource(new MediaTestSource(MediaType.Audio));
+
+ await ConnectPeerAsync(_offerClient, _answerClient);
+
+ var track = await tcsAnswerTrackAdded.Task;
+
+ if (!FeatureChecker.IsSupported(Features.Display))
+ {
+ Assert.That(() => track.DisplayVisible = true, Throws.TypeOf<NotSupportedException>(),
+ "Should throw NotSupportedException");
+
+ await Task.Delay(1000);
+ }
+ else
+ {
+ Assert.Pass("display feature is supported. So this TC cannot be tested.");
+ }
+ }
+ finally
+ {
+ _answerClient.TrackAdded -= eventHandler;
+ }
+ }
+
+ [Test]
[Category("P1")]
[Description("Check whether ApplyAudioStreamPolicy returns expected value or not.")]
[Property("SPEC", "Tizen.Multimedia.Remoting.MediaStreamTrack.ApplyAudioStreamPolicy M")]
}
[Test]
+ [Category("P2")]
+ [Description("Test AddSource whether throws NotSupportedException if display feature is not supported in MediaScreenSource.")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.WebRTC.AddSource M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void AddSource_THROWS_IF_NOT_SUPPORTED_WITH_MEDIASCREENSOURCE()
+ {
+ if (!FeatureChecker.IsSupported(Features.Display))
+ {
+ Assert.That(() => _webRtc.AddSource(new MediaScreenSource()),
+ Throws.TypeOf<NotSupportedException>(), "Should throw NotSupportedException");
+ }
+ else
+ {
+ Assert.Pass("display feature is supported. So this TC cannot be tested.");
+ }
+ }
+
+ [Test]
[Category("P1")]
[Description("Test AddSources whether throws exception or not.")]
[Property("SPEC", "Tizen.Multimedia.Remoting.WebRTC.AddSources M")]
}
[Test]
+ [Category("P2")]
+ [Description("Test AddSources whether throws NotSupportedException if display feature is not supported in MediaScreenSource.")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.WebRTC.AddSources M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void AddSources_THROWS_IF_NOT_SUPPORTED_WITH_MEDIASCREENSOURCE()
+ {
+ if (!FeatureChecker.IsSupported(Features.Display))
+ {
+ Assert.That(() => _webRtc.AddSources(new MediaScreenSource()),
+ Throws.TypeOf<NotSupportedException>(), "Should throw NotSupportedException");
+ }
+ else
+ {
+ Assert.Pass("display feature is supported. So this TC cannot be tested.");
+ }
+ }
+
+ [Test]
[Category("P1")]
[Description("Test RemoveSource whether throws exception or not.")]
[Property("SPEC", "Tizen.Multimedia.Remoting.WebRTC.RemoveSource M")]
WebRTCStatisticsCategory.LocalCandidate |
WebRTCStatisticsCategory.RemoteCandidate;
- private readonly string _turnServer = "turn://turnserver.address";
-
[SetUp]
public void Init()
{
// TaskCompletionSource<bool> _tcsOfferStatePlaying, _tcsAnswerStatePlaying;
TaskCompletionSource<bool> _tcsOfferIceGatheringStateCompleted, _tcsAnswerIceGatheringStateCompleted;
- TaskCompletionSource<bool> _tcsOfferIceConnectionStateCompleted, _tcsAnswerIceConnectionStateCompleted;
- TaskCompletionSource<bool> _tcsAnswerTrackAdded;
List<string> _offerIceCandidate, _answerIceCandidate;
{
public const string Microphone = "http://tizen.org/feature/microphone";
public const string Camera = "http://tizen.org/feature/camera";
+ public const string Display = "http://tizen.org/feature/display";
}