Esempio n. 1
0
        public void MockTest()
        {
            IRepository <RiskType> repo = new MockRiskTypeRepository();

            var allRisk = repo.Get();

            Assert.AreEqual(4, allRisk.Count());
        }
Esempio n. 2
0
        public void CheckInvalid()
        {
            IRepository <RiskType> repo = new MockRiskTypeRepository();

            Policy policy = new Policy()
            {
                RiskTypeId         = repo.Get().FirstOrDefault(r => r.Name.ToLower().Equals("bajo")).ID,
                CoveragePercentage = 60.1
            };

            Assert.IsTrue(policy.Validate());
        }