Exemple #1
0
        private void TestDivisionSet(bool goodData, RpcResponseStatus expectedResponse)
        {
            IRpcBroker broker = MockRpcBrokerFactory.GetXusDivisionSetBroker(goodData);

            XusDivisionSetCommand divCommand = new XusDivisionSetCommand(broker, "");

            RpcResponse response = divCommand.Execute();

            // *** Check results ***
            Assert.IsNotNull(response);
            Assert.AreEqual(expectedResponse, response.Status);
        }
Exemple #2
0
        public void TestSelectPost_NoSelection()
        {
            IRpcBroker broker = MockRpcBrokerFactory.GetXusDivisionSetBroker(true);

            DivisionController controller = new DivisionController(broker);

            FormCollection formCollection = new FormCollection();

            ActionResult result = controller.Select(formCollection);

            Assert.IsNotNull(result);
            Assert.IsInstanceOfType(result, typeof(RedirectToRouteResult));
            RedirectToRouteResult routeResult = (RedirectToRouteResult)result;

            Assert.AreEqual("Select", routeResult.RouteValues["action"]);
        }