예제 #1
0
        public void Exibir_View_Create()
        {
            _itemValor = new ItemValorController(_gerenciadorDeItemValor);
            var result = _itemValor.Create(1) as ViewResult;

            Assert.IsInstanceOfType(result, typeof(ViewResult));
        }
예제 #2
0
        public void Enviar_Create()
        {
            _itemValor = new ItemValorController(_gerenciadorDeItemValor);
            var itemValorViewModel = Mapeador.Mapear <ItemValor, ItemValorViewModel>(ItemValorStub.NovoItemValor());
            var result             = _itemValor.Create(itemValorViewModel) as RedirectToRouteResult;

            Assert.AreEqual("Index", result.RouteValues["action"]);
        }