Ejemplo n.º 1
0
        public void GetAllClaimsTests()
        {
            ClaimRepo repo     = new ClaimRepo();
            Claim     claim    = new Claim("ads", Claim.ClaimTypeOptions.Car, "descr", 124d, new DateTime(2020, 1, 15), new DateTime(2020, 2, 2));
            Claim     claimTwo = new Claim("22", Claim.ClaimTypeOptions.Home, "descrtiption", 22234d, new DateTime(1995, 7, 4), new DateTime(1996, 1, 10));

            repo.AddClaimToRepo(claim);
            repo.AddClaimToRepo(claimTwo);
            Console.WriteLine(repo.GetAllClaims().Count); //2
            Console.WriteLine(repo.GetAllClaims());       //some reference
            Assert.AreEqual(2, repo.GetAllClaims().Count);
        }
Ejemplo n.º 2
0
        public void AddClaimToRepoTests()
        {
            ClaimRepo repo     = new ClaimRepo();
            Claim     claim    = new Claim("ads", Claim.ClaimTypeOptions.Car, "descr", 124d, new DateTime(2020, 1, 15), new DateTime(2020, 2, 2));
            Claim     claimTwo = new Claim("22", Claim.ClaimTypeOptions.Home, "descrtiption", 22234d, new DateTime(1995, 7, 4), new DateTime(1996, 1, 10));

            Console.WriteLine(repo.AddClaimToRepo(claim)); //true
            Console.WriteLine(repo._claimRepo.Count);      //1
            Assert.IsTrue(repo.AddClaimToRepo(claimTwo));
            Assert.AreEqual(2, repo._claimRepo.Count);
            Console.WriteLine(repo._claimRepo.Count);//2
        }
Ejemplo n.º 3
0
        public void DisplayNextClaimTests()
        {
            ClaimRepo repo     = new ClaimRepo();
            Claim     claim    = new Claim("ads", Claim.ClaimTypeOptions.Car, "descr", 124d, new DateTime(2020, 1, 15), new DateTime(2020, 2, 2));
            Claim     claimTwo = new Claim("22", Claim.ClaimTypeOptions.Home, "descrtiption", 22234d, new DateTime(1995, 7, 4), new DateTime(1996, 1, 10));

            repo.AddClaimToRepo(claim);
            repo.AddClaimToRepo(claimTwo);
            Assert.AreEqual(2, repo._claimRepo.Count);
            repo.DisplayNextClaim();
            Assert.AreEqual(2, repo._claimRepo.Count);
            bool result = repo.DisplayNextClaim();

            Assert.IsTrue(result);
        }