示例#1
0
        public void ProxyValidateSettingDialogTest()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            var result = proxy.ValidateBeforeCloseSettingDialog();
            Assert.AreEqual(SettingDialogValidateionResult.Valid, result);
        }
示例#2
0
        public void CheckBaseImplementation()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            AssertHelper.ExpectedException <ArgumentException>(() => proxy.Query("   "));
            AssertHelper.ExpectedException <ArgumentException>(() => proxy.Query(string.Empty));
            AssertHelper.ExpectedException <NotSupportedException>(() => proxy.Query("BigEgg"));

            AssertHelper.ExpectedException <NotSupportedException>(() =>
                                                                   proxy.Query(new List <string>()));
            AssertHelper.ExpectedException <NotSupportedException>(() =>
                                                                   proxy.Query(new List <string>()
            {
                "BigEggg"
            }));

            AssertHelper.ExpectedException <NotImplementedException>(() =>
                                                                     proxy.CallQueryCore(new List <string>()
            {
                "BigEggg"
            }, true));
            AssertHelper.ExpectedException <NotImplementedException>(() =>
                                                                     proxy.CallQueryCore(new List <string>()
            {
                "BigEggg"
            }, false));
        }
示例#3
0
        public void ProxyValidateSettingDialogTest()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            var result = proxy.ValidateBeforeCloseSettingDialog();

            Assert.AreEqual(SettingDialogValidateionResult.Valid, result);
        }
示例#4
0
        public void ProxyInitializeTest()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            Assert.IsFalse(proxy.IsInitialized);
            proxy.Initialize();
            Assert.IsTrue(proxy.IsInitialized);
        }
示例#5
0
        public void PropertiesWithNotification()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            Assert.IsFalse(proxy.CanQuery);
            AssertHelper.PropertyChangedEvent(proxy, x => x.CanQuery, () => proxy.CanQueryValue = true);
            Assert.IsTrue(proxy.CanQuery);
        }
示例#6
0
        public void GeneralSourceControllerTest()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            Assert.AreEqual("proxyName", proxy.ProxyName);
            Assert.AreEqual(0, proxy.StateValues.Count);
            Assert.IsFalse(proxy.CanQuery);
        }
示例#7
0
        public void ProxyInitializeTest()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            Assert.IsFalse(proxy.IsInitialized);
            proxy.Initialize();
            Assert.IsTrue(proxy.IsInitialized);
        }
示例#8
0
        public void PropertiesWithNotification()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            Assert.IsFalse(proxy.CanQuery);
            AssertHelper.PropertyChangedEvent(proxy, x => x.CanQuery, () => proxy.CanQueryValue = true);
            Assert.IsTrue(proxy.CanQuery);
        }
示例#9
0
        public void GeneralSourceControllerTest()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            Assert.AreEqual("proxyName", proxy.ProxyName);
            Assert.AreEqual(0, proxy.StateValues.Count);
            Assert.IsFalse(proxy.CanQuery);
        }
示例#10
0
        public void QueryTest()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            proxy.CanQueryValue = true;

            ReadOnlyCollection <Bug> bugs = proxy.Query(new List <string>());

            Assert.AreEqual(0, bugs.Count);
        }
示例#11
0
        public void CheckBaseImplementation()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            AssertHelper.ExpectedException<ArgumentException>(() => proxy.Query("   "));
            AssertHelper.ExpectedException<ArgumentException>(() => proxy.Query(string.Empty));
            AssertHelper.ExpectedException<NotSupportedException>(() => proxy.Query("BigEgg"));

            AssertHelper.ExpectedException<NotSupportedException>(() =>
                proxy.Query(new List<string>()));
            AssertHelper.ExpectedException<NotSupportedException>(() =>
                proxy.Query(new List<string>() { "BigEggg" }));

            AssertHelper.ExpectedException<NotImplementedException>(() =>
                proxy.CallQueryCore(new List<string>() { "BigEggg" }, true));
            AssertHelper.ExpectedException<NotImplementedException>(() =>
                proxy.CallQueryCore(new List<string>() { "BigEggg" }, false));
        }
示例#12
0
        public void QueryTest()
        {
            MockTracingSystemProxy proxy = new MockTracingSystemProxy("proxyName");

            proxy.CanQueryValue = true;

            ReadOnlyCollection<Bug> bugs = proxy.Query(new List<string>());
            Assert.AreEqual(0, bugs.Count);
        }