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));
}
}