[Mirroring][Non-ACR]Change a way to use window 96/175896/2
authorSeokHoon Lee <andy.shlee@samsung.com>
Fri, 13 Apr 2018 07:16:54 +0000 (16:16 +0900)
committerHyunsoo Park <hance.park@samsung.com>
Mon, 16 Apr 2018 07:11:33 +0000 (16:11 +0900)
- Use instance of window hanlde instead of member variable.

Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I7520ff4d740154c26950235bb09239dcd177be4d

tct-suite-vs/Tizen.ScreenMirroring.Tests/testcase/TSScreenMirroring.cs
tct-suite-vs/Tizen.ScreenMirroring.Tests/testcase/TSScreenMirroringAudioInfo.cs
tct-suite-vs/Tizen.ScreenMirroring.Tests/testcase/TSScreenMirroringErrorOccurredEventArgs.cs
tct-suite-vs/Tizen.ScreenMirroring.Tests/testcase/TSScreenMirroringStateChangedEventArgs.cs
tct-suite-vs/Tizen.ScreenMirroring.Tests/testcase/TSScreenMirroringVideoInfo.cs
tct-suite-vs/Tizen.ScreenMirroring.Tests/testcase/support/TestBase.cs

index 962e0c8..7bb86b4 100755 (executable)
@@ -79,9 +79,12 @@ namespace Tizen.Multimedia.Tests
             /* TEST CODE
                 * Prepare screen mirroring and check sink state.
                 */
-            _screenmirroring.Prepare(_displayOverlay, _resolution);
+            _screenmirroring.Prepare(new Display(CreateWindow()), _resolution);
             Assert.IsTrue(_stateFlag, "State should be changed to prepared");
+
+            _screenmirroring.StateChanged -= _handlerState;
         }
+
         [Test]
         [Category("P1")]
         [Description("Test ScreenMirroring Prepare method and check event is invoked with proper state")]
@@ -97,8 +100,10 @@ namespace Tizen.Multimedia.Tests
             /* TEST CODE
              * Prepare screen mirroring and check sink state.
              */
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             Assert.IsTrue(_stateFlag, "State should be changed to prepared");
+
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -116,9 +121,10 @@ namespace Tizen.Multimedia.Tests
             /* TEST CODE
              * Prepare screen mirroring and check sink state.
              */
-            _screenmirroring.Prepare(_displayOverlay);
+            _screenmirroring.Prepare(new Display(CreateWindow()));
             Assert.IsTrue(_stateFlag, "State should be changed to prepared");
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -136,9 +142,10 @@ namespace Tizen.Multimedia.Tests
             /* TEST CODE
              * Prepare screen mirroring and check sink state.
              */
-            _screenmirroring.Prepare(_displayEvas);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())));
             Assert.IsTrue(_stateFlag, "State should be changed to prepared");
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -151,7 +158,6 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Hyunsop Park, hance.park@samsung.com")]
         public void Prepare_CHECK_ARGUMENT_EXCEPTION()
         {
-
             _screenmirroring.StateChanged += _handlerState;
 
             /* TEST CODE
@@ -162,6 +168,7 @@ namespace Tizen.Multimedia.Tests
                 _screenmirroring.Prepare(new Display(mediaView: null), (ScreenMirroringResolutions)(-1));
             });
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -181,9 +188,10 @@ namespace Tizen.Multimedia.Tests
              */
             Assert.Throws<ArgumentException>(delegate
             {
-                _screenmirroring.Prepare(_displayEvas, (ScreenMirroringResolutions)9999999);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), (ScreenMirroringResolutions)9999999);
             });
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -201,14 +209,15 @@ namespace Tizen.Multimedia.Tests
             /* TEST CODE
              * Prepare screen mirroring and check sink state.
              */
-            _screenmirroring.Prepare(_displayOverlay);
+            _screenmirroring.Prepare(new Display(CreateWindow()));
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             Assert.Throws<ObjectDisposedException>(delegate
             {
-                _screenmirroring.Prepare(_displayOverlay, _resolution);
+                _screenmirroring.Prepare(new Display(CreateWindow()), _resolution);
             });
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -226,14 +235,15 @@ namespace Tizen.Multimedia.Tests
             /* TEST CODE
              * Prepare screen mirroring and check sink state.
              */
-            _screenmirroring.Prepare(_displayOverlay);
+            _screenmirroring.Prepare(new Display(CreateWindow()));
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             Assert.Throws<ObjectDisposedException>(delegate
             {
-                _screenmirroring.Prepare(_displayOverlay);
+                _screenmirroring.Prepare(new Display(CreateWindow()));
             });
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -256,6 +266,7 @@ namespace Tizen.Multimedia.Tests
                 _screenmirroring.Prepare(new Display(mediaView: null));
             });
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -278,6 +289,7 @@ namespace Tizen.Multimedia.Tests
                 _screenmirroring.Prepare(new Display(window: (ElmSharp.Window)null));
             });
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -291,7 +303,6 @@ namespace Tizen.Multimedia.Tests
         {
             try
             {
-
                 /*
                  * TEST :
                  * Check if ConnectAsync(_ip, _port) api throws an exception
@@ -317,7 +328,6 @@ namespace Tizen.Multimedia.Tests
         {
             try
             {
-
                 /*
                  * TEST :
                  * Check if ConnectAsync(_ip, _port) api throws an exception
@@ -332,6 +342,7 @@ namespace Tizen.Multimedia.Tests
                 Log.Info(LogTag, "ScreenMirroring Test gives an exception. msg : " + e.ToString());
                 Assert.IsInstanceOf<InvalidOperationException>(e);
             }
+
         }
 
         [Test]
@@ -345,7 +356,6 @@ namespace Tizen.Multimedia.Tests
         {
             try
             {
-
                 /*
                  * TEST :
                  * Check if ConnectAsync(_ip, _port) api throws an exception
@@ -374,7 +384,6 @@ namespace Tizen.Multimedia.Tests
         {
             try
             {
-
                 /*
                  * TEST :
                  * Check if StartAsync api throws an exception
@@ -400,7 +409,6 @@ namespace Tizen.Multimedia.Tests
         {
             try
             {
-
                 /*
                  * TEST :
                  * Check if PauseAsync api throws an exception
@@ -413,7 +421,6 @@ namespace Tizen.Multimedia.Tests
                 Log.Info(LogTag, "ScreenMirroring Test gives an exception. msg : " + e.ToString());
                 Assert.IsInstanceOf<InvalidOperationException>(e);
             }
-
         }
 
         [Test]
@@ -427,7 +434,6 @@ namespace Tizen.Multimedia.Tests
         {
             try
             {
-
                 /*
                  * TEST :
                  * Check if ResumeAsync api throws an exception
@@ -460,7 +466,7 @@ namespace Tizen.Multimedia.Tests
                  * TEST :
                  * Prepare with resolution and check if screen mirroring is not throwing exception.
                  */
-                _screenmirroring.Prepare(new Display(new MediaView(_window)), resolution);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), resolution);
             }
             catch (Exception e)
             {
@@ -486,7 +492,7 @@ namespace Tizen.Multimedia.Tests
                  * TEST :
                  * Prepare with resolution and check if screen mirroring is not throwing exception.
                  */
-                _screenmirroring.Prepare(new Display(new MediaView(_window)), resolution);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), resolution);
             }
             catch (Exception e)
             {
@@ -512,7 +518,7 @@ namespace Tizen.Multimedia.Tests
                  * TEST :
                  * Prepare with resolution and check if screen mirroring is not throwing exception.
                  */
-                _screenmirroring.Prepare(new Display(new MediaView(_window)), resolution);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), resolution);
             }
             catch (Exception e)
             {
@@ -538,7 +544,7 @@ namespace Tizen.Multimedia.Tests
                  * TEST :
                  * Prepare with resolution and check if screen mirroring is not throwing exception.
                  */
-                _screenmirroring.Prepare(new Display(new MediaView(_window)), resolution);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), resolution);
             }
             catch (Exception e)
             {
@@ -564,7 +570,7 @@ namespace Tizen.Multimedia.Tests
                  * TEST :
                  * Prepare with resolution and check if screen mirroring is not throwing exception.
                  */
-                _screenmirroring.Prepare(new Display(new MediaView(_window)), resolution);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), resolution);
             }
             catch (Exception e)
             {
@@ -590,7 +596,7 @@ namespace Tizen.Multimedia.Tests
                  * TEST :
                  * Prepare with resolution and check if screen mirroring is not throwing exception.
                  */
-                _screenmirroring.Prepare(new Display(new MediaView(_window)), resolution);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), resolution);
             }
             catch (Exception e)
             {
@@ -616,7 +622,7 @@ namespace Tizen.Multimedia.Tests
                  * TEST :
                  * Prepare with resolution and check if screen mirroring is not throwing exception.
                  */
-                _screenmirroring.Prepare(new Display(new MediaView(_window)), resolution);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), resolution);
             }
             catch (Exception e)
             {
@@ -633,7 +639,6 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void Disconnect_CHECK_EXCEPTION()
         {
-
             /*
              * TEST :
              * Check if Disconect api throws an exception
@@ -642,7 +647,6 @@ namespace Tizen.Multimedia.Tests
             {
                 _screenmirroring.Disconnect();
             });
-
         }
 
         public void StateChangedIdle(object sender, ScreenMirroringStateChangedEventArgs e)
@@ -663,7 +667,7 @@ namespace Tizen.Multimedia.Tests
         public async Task Unprepare_CHECK_STATE()
         {
             _screenmirroring.StateChanged += StateChangedIdle;
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             await Task.Delay(1000);
 
             /* TEST CODE
@@ -672,6 +676,7 @@ namespace Tizen.Multimedia.Tests
             _screenmirroring.Unprepare();
             Assert.IsTrue(_stateFlag, "State should be changed to Null");
 
+            _screenmirroring.StateChanged -= StateChangedIdle;
         }
 
         [Test]
@@ -701,7 +706,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void AudioInfo_READ_ONLY()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
 
             /*
              * TEST: Check if screenmirroring has AudioInfo object
@@ -719,7 +724,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void VideoInfo_READ_ONLY()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
 
             /*
              * TEST: Check if screenmirroring has VideoInfo object
@@ -738,7 +743,7 @@ namespace Tizen.Multimedia.Tests
         public async Task StateChanged_CHECK_EVENT()
         {
             _screenmirroring.StateChanged += _handlerState;
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
 
             /*
             * TEST:
@@ -747,6 +752,7 @@ namespace Tizen.Multimedia.Tests
             await Task.Delay(1000);
             Assert.True(_stateFlag, "State Changed event not triggered");
 
+            _screenmirroring.StateChanged -= _handlerState;
         }
 
         [Test]
@@ -759,11 +765,14 @@ namespace Tizen.Multimedia.Tests
         public async Task ErrorOccurred_CHECK_EVENT()
         {
             var tcs = new TaskCompletionSource<bool>();
+            EventHandler<ScreenMirroringErrorOccurredEventArgs> checker = (s,e) => tcs.SetResult(true);
             Log.Info(LogTag, "out_ErrorOccurred_CHECK_EVENT");
-            _screenmirroring.ErrorOccurred += ((s, e) => tcs.SetResult(true));
-            _screenmirroring.Prepare(_displayOverlay, _resolution);
+            _screenmirroring.ErrorOccurred += checker;
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             await _screenmirroring.ConnectAsync(_ip);
             Assert.That(await tcs.Task, Is.True);
+
+            _screenmirroring.ErrorOccurred -= checker;
         }
     }
 }
index 7bdd83f..1a24f68 100755 (executable)
@@ -36,7 +36,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void Codec_CHECK_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             var exception = Assert.Throws<InvalidOperationException>(() =>
             {
                 ScreenMirroringAudioCodec result = _screenmirroring.AudioInfo.Codec;
@@ -53,7 +53,7 @@ namespace Tizen.Multimedia.Tests
         public void Codec_CHECK_DISPOSE_EXCEPTION()
         {
 
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             var exception = Assert.Throws<ObjectDisposedException>(() =>
@@ -72,7 +72,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void Channels_CHECK_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             var exception = Assert.Throws<InvalidOperationException>(() =>
             {
                 int result = _screenmirroring.AudioInfo.Channels;
@@ -89,7 +89,7 @@ namespace Tizen.Multimedia.Tests
         public void Channels_CHECK_DISPOSE_EXCEPTION()
         {
 
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             var exception = Assert.Throws<ObjectDisposedException>(() =>
@@ -108,7 +108,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void SampleRate_CHECK_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             var exception = Assert.Throws<InvalidOperationException>(() =>
             {
                 int result = _screenmirroring.AudioInfo.SampleRate;
@@ -125,7 +125,7 @@ namespace Tizen.Multimedia.Tests
         public void SampleRate_CHECK_DISPOSE_EXCEPTION()
         {
 
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             var exception = Assert.Throws<ObjectDisposedException>(() =>
@@ -145,7 +145,7 @@ namespace Tizen.Multimedia.Tests
         public void BitWidth_CHECK_EXCEPTION()
         {
 
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             var exception = Assert.Throws<InvalidOperationException>(() =>
             {
                 int result = _screenmirroring.AudioInfo.BitWidth;
@@ -162,7 +162,7 @@ namespace Tizen.Multimedia.Tests
         public void BitWidth_CHECK_DISPOSE_EXCEPTION()
         {
 
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             var exception = Assert.Throws<ObjectDisposedException>(() =>
index 7166c8b..5b6cae8 100755 (executable)
@@ -40,7 +40,7 @@ namespace Tizen.Multimedia.Tests
         {
             var tcs = new TaskCompletionSource<bool>();
             _screenmirroring.ErrorOccurred += ((s, e) => tcs.SetResult(true));
-            _screenmirroring.Prepare(_displayOverlay, _resolution);
+            _screenmirroring.Prepare(new Display(CreateWindow()), _resolution);
             await _screenmirroring.ConnectAsync(_ip);
             Assert.That(await tcs.Task, Is.True);
         }
index a53996a..625a13f 100755 (executable)
@@ -61,11 +61,12 @@ namespace Tizen.Multimedia.Tests
             /* TEST CODE
              * Check sink state.
              */
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             _screenmirroring.Unprepare();
             await Task.Delay(3000);
             Assert.IsTrue(_stateFlag, "State should be changed to Idle");
 
+            _screenmirroring.StateChanged -= StateChangedIdle;
         }
 
         public void StateChangedPrepared(object sender, ScreenMirroringStateChangedEventArgs e)
@@ -91,9 +92,10 @@ namespace Tizen.Multimedia.Tests
             /* TEST CODE
              * Prepare screen mirroring and check sink state.
              */
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             Assert.IsTrue(_stateFlag, "State should be changed to Prepared");
 
+            _screenmirroring.StateChanged -= StateChangedPrepared;
         }
 
         public void StateChangedConnected(object sender, ScreenMirroringStateChangedEventArgs e)
@@ -125,7 +127,7 @@ namespace Tizen.Multimedia.Tests
             try
             {
                 _screenmirroring.StateChanged += StateChangedDisconnected;
-                _screenmirroring.Prepare(_displayEvas, _resolution);
+                _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
 
                 /*
                  * TEST CODE
@@ -133,6 +135,8 @@ namespace Tizen.Multimedia.Tests
                  */
                 _screenmirroring.Disconnect();
                 Assert.IsTrue(_stateFlag, "State is changed to disconnected");
+
+                _screenmirroring.StateChanged -= StateChangedDisconnected;
             }
             catch (Exception e)
             {
index 3e183fb..db818e8 100755 (executable)
@@ -36,7 +36,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void Codec_CHECK_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             var exception = Assert.Throws<InvalidOperationException>(() =>
             {
                 ScreenMirroringVideoCodec result = _screenmirroring.VideoInfo.Codec;
@@ -52,7 +52,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Hyunsoo Park, hance.park@samsung.com")]
         public void Codec_CHECK_DISPOSE_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             var exception = Assert.Throws<ObjectDisposedException>(() =>
@@ -70,7 +70,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void Resolution_CHECK_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             var exception = Assert.Throws<InvalidOperationException>(() =>
             {
                 Size result = _screenmirroring.VideoInfo.Resolution;
@@ -86,7 +86,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Hyunsoo Park, hance.park@samsung.com")]
         public void Resolution_CHECK_DISPOSE_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             var exception = Assert.Throws<ObjectDisposedException>(() =>
@@ -104,7 +104,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Gaurang Khanwalkar, g.khanwalkar@samsung.com")]
         public void FrameRate_CHECK_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             var exception = Assert.Throws<InvalidOperationException>(() =>
             {
                 int result = _screenmirroring.VideoInfo.FrameRate;
@@ -120,7 +120,7 @@ namespace Tizen.Multimedia.Tests
         [Property("AUTHOR", "Hyunsoo Park, hance.park@samsung.com")]
         public void FrameRate_CHECK_DISPOSE_EXCEPTION()
         {
-            _screenmirroring.Prepare(_displayEvas, _resolution);
+            _screenmirroring.Prepare(new Display(new MediaView(CreateWindow())), _resolution);
             _screenmirroring.Unprepare();
             _screenmirroring.Dispose();
             var exception = Assert.Throws<ObjectDisposedException>(() =>
index 2cb704f..bb81c1b 100755 (executable)
@@ -10,10 +10,6 @@ namespace Tizen.Multimedia.Tests
     {
         private const string LogTag = "TizenTest.Multimedia.Remoting.ScreenMirroring";
         protected ScreenMirroring _screenmirroring;
-        protected Window _window = new Window("New _window");
-        protected MediaView _mediaView;
-        protected Display _displayEvas;
-        protected Display _displayOverlay;
 
         [SetUp]
         public void SetUpBase()
@@ -35,28 +31,11 @@ namespace Tizen.Multimedia.Tests
                 Log.Error(LogTag, "[ Error in ScreenMirroring : " + e.ToString() + "]");
                 Assert.Fail("ScreenMirroring is failed with unknown Exception.");
             }
-
-            try
-            {
-                _mediaView = new MediaView(_window);
-                _displayOverlay = new Display(_window);
-                _displayEvas = new Display(_mediaView);
-            }
-            catch (NotSupportedException)
-            {
-                ScreenMirroringTestSupport.AssertMediaDisplayNotSupported();
-            }
-            catch (Exception e)
-            {
-                Log.Error(LogTag, "[ Error in media view display. : " + e.ToString() + "]");
-                Assert.Fail("ScreenMirroring is failed with unknown Exception.");
-            }
-
         }
+
         [TearDown]
         public void TearDownBase()
         {
-
             try
             {
                 _screenmirroring?.Unprepare();
@@ -68,5 +47,11 @@ namespace Tizen.Multimedia.Tests
             }
             _screenmirroring?.Dispose();
         }
+
+        internal static Window CreateWindow()
+        {
+            var w = new Window("");
+            return w;
+        }
     }
 }