示例#1
0
        public void TestActivityMonitorProxySubscriptions()
        {
            _expectingAsyncEvents = false;

            var testMonitor  = new TestActivityMonitor();
            var monitorProxy = new WorkItemActivityMonitorProxy(testMonitor, null);

            TestActivityMonitorSubscriptions(monitorProxy, testMonitor);
        }
示例#2
0
        public void TestActivityMonitorProxyConnected()
        {
            ResetCallbackFields();
            var test = new TestActivityMonitor();
            var proxy = new WorkItemActivityMonitorProxy(test, null);

            test.IsConnected = true;
            Assert.AreEqual(0, IsConnectedChangedCount);

            proxy.IsConnectedChanged += OnIsConnectedChanged;
            test.IsConnected = true;

            Assert.AreEqual(0, IsConnectedChangedCount);

            test.IsConnected = false;
            Assert.AreEqual(1, IsConnectedChangedCount);

            test.IsConnected = true;
            Assert.AreEqual(2, IsConnectedChangedCount);

            proxy.IsConnectedChanged -= OnIsConnectedChanged;
            test.IsConnected = false;
            Assert.AreEqual(2, IsConnectedChangedCount);
        }
示例#3
0
        public void TestActivityMonitorProxyConnected()
        {
            ResetCallbackFields();
            var test  = new TestActivityMonitor();
            var proxy = new WorkItemActivityMonitorProxy(test, null);

            test.IsConnected = true;
            Assert.AreEqual(0, IsConnectedChangedCount);

            proxy.IsConnectedChanged += OnIsConnectedChanged;
            test.IsConnected          = true;

            Assert.AreEqual(0, IsConnectedChangedCount);

            test.IsConnected = false;
            Assert.AreEqual(1, IsConnectedChangedCount);

            test.IsConnected = true;
            Assert.AreEqual(2, IsConnectedChangedCount);

            proxy.IsConnectedChanged -= OnIsConnectedChanged;
            test.IsConnected          = false;
            Assert.AreEqual(2, IsConnectedChangedCount);
        }
示例#4
0
        public void TestActivityMonitorProxySubscriptions()
        {
            _expectingAsyncEvents = false;

            var testMonitor = new TestActivityMonitor();
            var monitorProxy = new WorkItemActivityMonitorProxy(testMonitor, null);

            TestActivityMonitorSubscriptions(monitorProxy, testMonitor);
        }