Ejemplo n.º 1
0
        public void Exibir_View_Delete()
        {
            _itemValor = new ItemValorController(_gerenciadorDeItemValor);
            var result = _itemValor.Delete(1) as ViewResult;

            Assert.IsInstanceOfType(result, typeof(ViewResult));
        }
        public void Delete()
        {
            this.InstanciarRequest(HttpMethod.Delete);
            var result = _itemValorAPI.Delete(1);

            Assert.IsTrue(result.IsSuccessStatusCode);
        }
Ejemplo n.º 3
0
        public void Enviar_Delete()
        {
            _itemValor = new ItemValorController(_gerenciadorDeItemValor);
            var itemValorViewModel = Mapeador.Mapear <ItemValor, ItemValorViewModel>(ItemValorStub.ItemValor());
            var result             = _itemValor.Delete(1, itemValorViewModel) as RedirectToRouteResult;

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