Esempio n. 1
0
        private void SeedClaimQueue()
        {
            Claim claimA = new Claim(1, TypeOfClaim.Car, "Car accident on 465", 400.00m, "4/25/18", "4/27/18", true);
            Claim claimB = new Claim(2, TypeOfClaim.Home, "House fire in kitchen", 4000.00m, "4/11/18", "4/12/18", true);
            Claim claimC = new Claim(3, TypeOfClaim.Theft, "Stolen Pancakes", 4.00m, "4/27/18", "6/27/18", false);

            _claimRepo.AddAClaimToQueue(claimA);
            _claimRepo.AddAClaimToQueue(claimB);
            _claimRepo.AddAClaimToQueue(claimC);
        }
Esempio n. 2
0
 public void Arrange()
 {
     _repo  = new ClaimRepo();
     _claim = new Claim(1, TypeOfClaim.Car,
                        "Car accident on 465", 400.00m,
                        "04/25/2018", "04/27/2018", true);
     _repo.AddAClaimToQueue(_claim);
 }
Esempio n. 3
0
        //testing create method
        public void AddClaimToQueue_ShouldGetCorrectBoolean()
        {
            //Arrange
            Claim     claim = new Claim();
            ClaimRepo repo  = new ClaimRepo();
            //Act
            bool addResult = repo.AddAClaimToQueue(claim);

            //Assert
            Assert.IsTrue(addResult);
        }
Esempio n. 4
0
        public void ViewAllClaims_ShouldReturnAllClaimsInQueue()
        {
            //Arrange
            Claim claim = new Claim();
            //creating the repo
            ClaimRepo repo = new ClaimRepo();

            //adding to the repo(claim)
            repo.AddAClaimToQueue(claim);
            //act
            //store queue of claims within a variable
            Queue <Claim> claimQueue = repo.ViewAllClaims();
            //looks through our entire queue and returns true if there is content
            bool queueHasClaims = claimQueue.Contains(claim);

            //assert
            Assert.IsTrue(queueHasClaims);
        }