Esempio n. 1
0
        public void AddRoutingRule_EmptyDisplayName_Failure()
        {
            RoutingRule oRoutingRule;
            var         res = RoutingRule.AddRoutingRule(_mockServer, "", null, out oRoutingRule);

            Assert.IsFalse(res.Success, "Calling AddRoutingRule with empty display name should fail");
        }
Esempio n. 2
0
        public new static void MyClassInitialize(TestContext testContext)
        {
            BaseIntegrationTests.MyClassInitialize(testContext);

            //create new handler with GUID in the name to ensure uniqueness
            String strName = "TempRule_" + Guid.NewGuid().ToString().Replace("-", "");

            WebCallResult res = RoutingRule.AddRoutingRule(_connectionServer, strName, null, out _tempRule);

            Assert.IsTrue(res.Success, "Failed creating temporary routing rule:" + res.ToString());
        }
Esempio n. 3
0
        public void AddRoutingRule_ErrorResponse_Failure()
        {
            Reset();
            _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), MethodType.GET, It.IsAny <ConnectionServerRest>(),
                                                        It.IsAny <string>(), true)).Returns(new WebCallResult
            {
                Success      = false,
                ResponseText = "error text",
                StatusCode   = 404
            });

            var res = RoutingRule.AddRoutingRule(_mockServer, "Display Name", null);

            Assert.IsFalse(res.Success, "Calling AddRoutingRule with ErrorResponse did not fail");
        }
Esempio n. 4
0
        public void AddRoutingRule_NullConnectionServer_Failure()
        {
            var res = RoutingRule.AddRoutingRule(null, "display name", null);

            Assert.IsFalse(res.Success, "Calling AddRoutingRule with null ConnectionServerRest should fail");
        }