Exemplo n.º 1
0
        public void UpdateRoutingRule_EmptyProperties_Failure()
        {
            ConnectionPropertyList oProps = new ConnectionPropertyList();
            var res = RoutingRule.UpdateRoutingRule(_mockServer, "objectid", oProps);

            Assert.IsFalse(res.Success, "Calling UpdateRoutingRule with empty properties should fail");
        }
Exemplo n.º 2
0
        public void UpdateRoutingRule_NullConnectionServer_Failure()
        {
            ConnectionPropertyList oProps = new ConnectionPropertyList();

            var res = RoutingRule.UpdateRoutingRule(null, "objectid", oProps);

            Assert.IsFalse(res.Success, "Calling UpdateRoutingRule with null ConnectionServerRest should fail");
        }
Exemplo n.º 3
0
        public void StaticMethodFailure_UpdateRoutingRule()
        {
            ConnectionPropertyList oProps = new ConnectionPropertyList();

            oProps.Add("test", "test");
            var res = RoutingRule.UpdateRoutingRule(_connectionServer, "objectid", oProps);

            Assert.IsFalse(res.Success, "Calling UpdateRoutingRule with invalid ObjectId should fail");
        }
Exemplo n.º 4
0
        public void UpdateRoutingRule_ErrorResponse_Failure()
        {
            Reset();
            _mockTransport.Setup(x => x.GetCupiResponse(It.IsAny <string>(), MethodType.PUT, It.IsAny <ConnectionServerRest>(),
                                                        It.IsAny <string>(), It.IsAny <bool>())).Returns(new WebCallResult
            {
                Success      = false,
                ResponseText = "error text",
                StatusCode   = 404
            });

            ConnectionPropertyList oProps = new ConnectionPropertyList();

            oProps.Add("Test", "test");
            var res = RoutingRule.UpdateRoutingRule(_mockServer, "ObjectId", oProps);

            Assert.IsFalse(res.Success, "Calling UpdateRoutingRule with ErrorResponse did not fail");
        }
Exemplo n.º 5
0
        public void UpdateRoutingRule_NullProperties_Failure()
        {
            var res = RoutingRule.UpdateRoutingRule(_mockServer, "objectid", null);

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