Beispiel #1
0
        public void Index_Test()
        {
            PolizasController controller = new PolizasController();

            var result = controller.Index() as ViewResult;

            Assert.IsNotNull(result);
            Assert.IsTrue(string.IsNullOrEmpty(result.ViewName) || result.ViewName == "Index");
        }
Beispiel #2
0
        public void polizasTest()
        {
            //var controller = new ProductController();
            //var result = controller.Details(2) as ViewResult;
            //Assert.AreEqual("Details", result.ViewName);

            var poliza    = new PolizasController();
            var mvcPoliza = new mvcPolizasModel()
            {
                tipoRiesgo = "alto", Cobertura = 70
            };
            var resultado = (ViewResult)poliza.Create(mvcPoliza) as ViewResult;

            Assert.AreEqual("Create", resultado.ViewName);
        }
Beispiel #3
0
 public AgreguePolizaTest()
 {
     _reglas            = Substitute.For <IReglasPoliza>();
     _repositorio       = Substitute.For <IRepositorioPoliza>();
     _polizasController = new PolizasController((RepositorioPoliza)_repositorio, _reglas);
 }
 public void InitializeTest()
 {
     this.controller = new PolizasController();
 }