Ejemplo n.º 1
0
        //displays next claim and asks the manager if they would like to deal with the claim or not
        public void NextClaimInLine()
        {
            Console.Clear();
            ClaimsPOCOs claimContent = _claimRepo.SeeNextClaimInQueue();

            Console.WriteLine($"Claim ID: {claimContent.ClaimID}\n" +
                              $"Claim Description: {claimContent.Description}\n" +
                              $"Claim Amount: {claimContent.ClaimAmount}\n" +
                              $"Claim Type: {claimContent.ClaimType}\n" +
                              $"Date Of Incident: {claimContent.DateOfIncident}\n" +
                              $"Date Of Claim: {claimContent.DateOfClaim}\n" +
                              $"Claim is Valid: {claimContent.IsValid}");


            Console.WriteLine("Do you want to to deal with this claim? (y/n)");
            string userInputDealWithNextClaim = Console.ReadLine().ToLower();

            if (userInputDealWithNextClaim == "y")
            {
                bool isSuccessful = _claimRepo.GrabClaimFromQueue();
                if (isSuccessful)
                {
                    Console.WriteLine("Claim Pulled");
                }
            }
            else if (userInputDealWithNextClaim == "n")
            {
                Console.WriteLine("Returning to Main Menu");
            }
            Console.ReadKey();
        }
        public void GrabClaimFromQueue()
        {
            ClaimsPOCOs content = _repo.GetClaimByID(1);

            bool removeResult = _repo.GrabClaimFromQueue();

            Assert.IsTrue(removeResult);
        }