public void CreatePolicyIsSuccess()
        {
            Policy policy = new Policy
            {
                AmountMonthsCoverage = 12,
                CoveragePercentage   = 99,
                CoveringType         = CoveringType.Incendio,
                Description          = "Descripcion poliza prueba unitaria",
                Name     = "Poliza prueba unitaria",
                Price    = 897456,
                RiskType = RiskType.Medio
            };

            IPolicyBussiness policyBussiness = new PolicyBussiness();

            var mockRepository = new Mock <IMongoRepository <Policy> >();

            mockRepository.Setup(p => p.InsertOne(policy)).Returns(Task.CompletedTask);

            policyBussiness.RepositoryPolicy = mockRepository.Object;

            Response response = policyBussiness.CreatePolicy(policy).Result;

            Assert.True(response.ActionResponse.Success);
        }
        public void IfRiskTypeIsHighAndCoveragePercentageIs50ValidateToCreatePolicyIsNotSuccess()
        {
            Policy policy = new Policy
            {
                AmountMonthsCoverage = 12,
                CoveragePercentage   = 51,
                CoveringType         = CoveringType.Incendio,
                Description          = "Descripcion poliza prueba unitaria",
                Name     = "Poliza prueba unitaria",
                Price    = 50000,
                RiskType = RiskType.Alto
            };

            IPolicyBussiness policyBussiness = new PolicyBussiness();

            Response response = policyBussiness.CreatePolicy(policy).Result;

            Assert.False(response.ActionResponse.Success);
            Assert.Equal(Message.CoveragePercentageByCoveringTypeIncorrect.Text, response.ActionResponse.Message.Text);
        }