[MediaController][Non-ACR] Use linq to check client is included 55/210355/1
authorHaesu Gwon <haesu.gwon@samsung.com>
Thu, 18 Jul 2019 07:25:26 +0000 (16:25 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Thu, 18 Jul 2019 07:25:26 +0000 (16:25 +0900)
Change-Id: Ifdf9260d7bae3f29ca2a88ac2bfdeefeacbaae86

tct-suite-vs/Tizen.MediaController.Tests/testcase/TSMediaControlServer.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 13cfc7a..7e70030
@@ -251,11 +251,10 @@ namespace Tizen.Multimedia.Remoting.Tests
                 var mediaController = manager.GetActiveControllers().Single(
                         c => c.ServerAppId == Application.Current.ApplicationInfo.ApplicationId);
 
-                foreach (var controller in MediaControlServer.GetActivatedClients())
-                {
-                    //Assert.That(controller, Is.Not.Null);
-                    Assert.That(controller, Is.EqualTo(Application.Current.ApplicationInfo.ApplicationId));
-                }
+                // If there's many clients, it's better to check
+                // whether current client is included 'activated client list' or not.
+                Assert.That(MediaControlServer.GetActivatedClients().
+                    Contains(Application.Current.ApplicationInfo.ApplicationId));
             }
         }