예제 #1
0
        public void DeviceLocator_Notifications_StartListeningThrowsIfDisposed()
        {
            var deviceLocator = new MockDeviceLocator();

            deviceLocator.Dispose();

            deviceLocator.StartListeningForNotifications();
        }
예제 #2
0
        public void DeviceLocator_SearchAsync_AllowsZeroSearchTime()
        {
            var server        = new MockCommsServer();
            var deviceLocator = new MockDeviceLocator(server);

            string searchTarget = "ssdp:all";
            var    t            = deviceLocator.SearchAsync(searchTarget, TimeSpan.Zero);

            t.GetAwaiter().GetResult();
            server.Dispose();
            deviceLocator.Dispose();
        }
예제 #3
0
        public void DeviceLocator_SearchAsync_AllowsZeroSearchTime()
        {
            var server = new MockCommsServer();
            var deviceLocator = new MockDeviceLocator(server);

            string searchTarget = "ssdp:all";
            var t = deviceLocator.SearchAsync(searchTarget, TimeSpan.Zero);
            t.GetAwaiter().GetResult();
            server.Dispose();
            deviceLocator.Dispose();
        }
예제 #4
0
        public void DeviceLocator_Notifications_StartListeningThrowsIfDisposed()
        {
            var deviceLocator = new MockDeviceLocator();
            deviceLocator.Dispose();

            deviceLocator.StartListeningForNotifications();
        }