Exemplo n.º 1
0
        public void HttpPost_DeleteConfirmedMethod_RedirectsToIndex()
        {
            serviceMocker.Setup(e => e.GetById(It.IsAny <int>())).Returns(new Customer {
                BillingAddress = new Address(), StreetAddress = new Address()
            });

            var result = controller.DeleteConfirmed(1234);

            Assert.That(result, Is.InstanceOf <RedirectToRouteResult>());

            var redirectResult = result as RedirectToRouteResult;

            Assert.That(redirectResult.RouteValues["Action"], Is.EqualTo("Index"));
        }