[Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MCST")]
+ [Property("COVPARAM", "string")]
[Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
[Precondition(1, "For screen mirroring manual testing, we need one more devices(that is, we need 2 devices(source target and sink target(On sink target, we should execute tct))")]
[Precondition(2, "Please install 'scm_testfile.tpk'(called 'app') on source target(TM1). 'scm_testfile.tpk' is located in this path. ->(/opt/tct/tizen_csharp_3.0/resource/helper-applications)")]
ScreenMirroring.Disconnect();
await Task.Delay(1000);
}
+
+ [Test]
+ [Category("P1")]
+ [Description("Test ConnectAsync with port method")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MCST")]
+ [Property("COVPARAM", "string, uint")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ [Precondition(1, "For screen mirroring manual testing, we need one more devices(that is, we need 2 devices(source target and sink target(On sink target, we should execute tct))")]
+ [Precondition(2, "Please install 'scm_testfile.tpk'(called 'app') on source target(TM1). 'scm_testfile.tpk' is located in this path. ->(/opt/tct/tizen_csharp_3.0/resource/helper-applications)")]
+ [Precondition(3, "Please Connect both(source and sink) with 'Wi-Fi Direct' and launch 'app' on source target. ")]
+ [Precondition(4, "After launching 'app', please touch 'Source Start' button in the 'app'.")]
+ [Precondition(5, "Right after, 'app' shows you on display 'Received callback error code[0],state[3]' message. Then source is in ready. (source target process complete)")]
+ [Step(1, "Please touch 'Run' button on the bottom of screen.")]
+ [Step(2, "And manual TC shows you 'Start' button. Please touch it.")]
+ [Step(3, "If it works well, 'app' in source target shows you 'Received callback error code[0],state[4]' message and 'Received callback error code[0],state[7]' message in order.")]
+ [Step(4, "Screen on sink target automatically comback to previous and test case is succeeded, screen on sink target shows you 'PASS' message automatically.")]
+ [Step(5, "When failed, it shows you 'FAIL' message.")]
+ public async Task ConnectAsync_WITH_PORT_CHANGE_STATE()
+ {
+ Log.Debug(LogTag, "Start ConnectAsync_CHANGE_STATE");
+ if (await CheckScreenMirroringSupported() || await CheckWifiDirectSupported())
+ {
+ return;
+ }
+
+ ScreenMirroring.Prepare(_display);
+ ScreenMirroring.StateChanged += (s, e) =>
+ {
+ if (e.State == ScreenMirroringState.Connected)
+ {
+ _msgBox.Text = "TC is passed. Please go back to previous page.";
+ ManualTest.Confirm();
+ }
+ };
+
+ /*
+ * TEST CODE
+ * test preview
+ */
+ await CreateButton("Start Test");
+
+ _button1.Clicked += (sender, e) =>
+ {
+ ScreenMirroring.ConnectAsync(Ip, 7777);
+
+ _button1.IsEnabled = false;
+ };
+
+ await ManualTest.WaitForConfirm();
+
+ ScreenMirroring.Disconnect();
+ await Task.Delay(1000);
+ }
}
}
[Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "string")]
[Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
public async Task ConnectAsync_CHECK_EXCEPTION()
{
[Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "string")]
[Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
public void ConnectAsync_CHECK_AUGUMENT_NULL_EXCEPTION()
{
[Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
[Property("SPEC_URL", "-")]
[Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "string")]
[Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
public void ConnectAsync_CHECK_AUGUMENT_EXCEPTION()
{
[Test]
[Category("P2")]
+ [Description("Invoke ConnectAsync method before Preapare method, and check InvalidOperation exception is thrown or not")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "string, uint")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void ConnectAsync_WITH_PORT_CHECK_EXCEPTION()
+ {
+ Assert.That(async () => await _screenmirroring.ConnectAsync(_ip, 2022), Throws.InvalidOperationException,
+ "Should throw InvalidOperationException");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Invoke ConnectAsync method before Preapare method, and check ArgumentNullexception is thrown or not")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "string, uint")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void ConnectAsync_WITH_PORT_CHECK_AUGUMENT_NULL_EXCEPTION()
+ {
+ Assert.Throws<ArgumentNullException>(() =>
+ _screenmirroring.ConnectAsync(sourceIp: null, port: 2022));
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Invoke ConnectAsync method before Preapare method, and check Argumentexception is thrown or not")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "string, uint")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void ConnectAsync_WITH_PORT_CHECK_AUGUMENT_EXCEPTION()
+ {
+ Assert.That(() => _screenmirroring.ConnectAsync("", 2022), Throws.ArgumentException,
+ "Should throw ArgumentException");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Invoke ConnectAsync method before Preapare method, and check ArgumentOutOfRangeexception is thrown or not")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "string, uint")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void ConnectAsync_WITH_PORT_CHECK_OUT_OF_RANGE()
+ {
+ Assert.That(() => _screenmirroring.ConnectAsync(_ip, 100000), Throws.TypeOf<ArgumentOutOfRangeException>(),
+ "Should throw ArgumentOutOfRangeException");
+ }
+
+ [Test]
+ [Category("P2")]
+ [Description("Invoke ConnectAsync method before Preapare method, and check whether throws ObjectDisposedException if ScreenMirroring is already disposed")]
+ [Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.ConnectAsync M")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "MEX")]
+ [Property("COVPARAM", "string, uint")]
+ [Property("AUTHOR", "Haesu Gwon, haesu.gwon@samsung.com")]
+ public void ConnectAsync_WITH_PORT_THROWS_IF_ALREADY_DISPOSED()
+ {
+ _screenmirroring.Dispose();
+
+ Assert.That(() => _screenmirroring.ConnectAsync(_ip, 2022), Throws.TypeOf<ObjectDisposedException>(),
+ "Should throw ObjectDisposedException");
+ }
+
+ [Test]
+ [Category("P2")]
[Description("Invoke StartAsync method before Preapare method, and check InvalidOperation exception is thrown or not")]
[Property("SPEC", "Tizen.Multimedia.Remoting.ScreenMirroring.StartAsync M")]
[Property("SPEC_URL", "-")]