コード例 #1
0
 public void TestInit()
 {
     _repo      = new ClaimRepo();
     claimOne   = new Claim(1, ClaimType.Car, "Hit a horse and exploded", 25000.11234, new DateTime(2011, 11, 21), new DateTime(2020, 3, 19));
     claimTwo   = new Claim(2, ClaimType.Home, "Horse exploded and blew out my windows", 350.285678, new DateTime(2011, 11, 21), new DateTime(2011, 11, 30));
     claimThree = new Claim(3, ClaimType.Theft, "Someone stole my horse and car for nefarious reasons", 20000.37466, new DateTime(2011, 10, 30), new DateTime(2011, 11, 21));
     _repo.CreateNewClaim(claimOne);
     _repo.CreateNewClaim(claimTwo);
     _repo.CreateNewClaim(claimThree);
 }
コード例 #2
0
        public void CreateNewClaim_AddsAClaim()
        {
            int   expected = 4;
            Claim newClaim = new Claim();

            _repo.CreateNewClaim(newClaim);
            int actual = _repo.GetClaimCount();

            Assert.AreEqual(expected, actual);
        }