}//end of Enter New Claim private void HandleClaim() { Queue <Claim> queueOfClaims = _claimRepo.GetClaimList(); Claim nextClaim = queueOfClaims.Peek(); Console.WriteLine("Here are the details for the next claim to be handled:"); Console.WriteLine("Claim ID : " + nextClaim.ClaimID); Console.WriteLine("Type : " + nextClaim.TypeOfClaim); Console.WriteLine("Amount : " + nextClaim.ClaimAmount); Console.WriteLine("Description : " + nextClaim.Description); Console.WriteLine("Date of Incident : " + nextClaim.DateOfIncident); Console.WriteLine("Date of Claim : " + nextClaim.DateOfClaim); Console.WriteLine("Is Valid ? : " + nextClaim.IsValid); Console.Write("Do you want to deal with this claim now(y/n)? "); string reply = Console.ReadLine().ToLower(); if (reply == "y") { Console.WriteLine("Thank you. The claim will be removed from the queue."); Console.WriteLine(" "); _claimRepo.RemoveClaimFromQueue(nextClaim.ClaimID); } else if (reply == "n") { Console.WriteLine("The claim will remian in the queue."); Console.WriteLine(" "); } }
public void GetCountOfQueue() { int count = _repo.GetClaimList().Count; Assert.AreEqual(2, count); }