Пример #1
0
        public ActionResult Details(long id)
        {
            PolicyResponse    policy = PolicyApplicationService.ReadPolicyById(id);
            CoveringModelView model  = new CoveringModelView();

            model.policy   = policy;
            model.covering = policy.TSeg_Tipo_Cubrimiento;

            return(View("~/Views/Policies/CoveringDetails.cshtml", model));
        }
Пример #2
0
        public List <CustomerPolicyResponse> getPoliciesDetails(List <CustomerPolicyResponse> list)
        {
            for (int i = 0; i < list.Count; i++)
            {
                PolicyResponse policy = PolicyApplicationService.ReadPolicyById(list.ElementAt(i).id_poliza);
                list.ElementAt(i).nombre_poliza = policy.nombre;
            }

            return(list);
        }
        public void readPolicyByIdWithoutResultTest()
        {
            Mock <IPolicyDomainService> mock = new Mock <IPolicyDomainService>();

            mock.Setup(x => x.ReadPolicyById(It.IsAny <long>())).Returns(getTSegPolizaNull());
            PolicyApplicationService test = new PolicyApplicationService(mock.Object);
            var response = test.ReadPolicyById(100);

            Assert.IsTrue(response == null);
        }