Example #1
0
        public void TestOrderController_OrderInQuote_ShouldRenderPartialViewOrderInQuote(string httpMethod)
        {
            QuoteItemsModel model = new QuoteItemsModel();

            var httpContextMock = FakeHttpContext(httpMethod);
            var controllerMock  = new Mock <ControllerBase>(MockBehavior.Loose);

            var routeData = new RouteData();

            routeData.Values.Add("key1", "/ProjectDashboard/Orders");

            var controllerContext = new ControllerContext(httpContextMock, routeData, controllerMock.Object);

            orderController.ControllerContext = controllerContext;

            var result = orderController.OrderInQuote(model) as ViewResult;

            Assert.That(result.ViewName, Is.EqualTo("OrderInQuote"));
        }