public void Exibir_View_Create() { _orcamento = new OrcamentoController(_gerenciadorDeOrcamento); var result = _orcamento.Create() as ViewResult; Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public void Enviar_Create() { _orcamento = new OrcamentoController(_gerenciadorDeOrcamento); var orcamentoViewModel = Mapeador.Mapear <Orcamento, OrcamentoViewModel>(OrcamentoStub.NovaDespesa()); var result = _orcamento.Create(orcamentoViewModel) as RedirectToRouteResult; Assert.AreEqual("Index", result.RouteValues["action"]); }