Exemple #1
0
        private void GetNextClaim()
        {
            KomodoClaims list = _claimRepo.PeekNextContent();

            Console.WriteLine($"Here are the details for the next claim to be handled\n" +
                              $"ClaimID: {list.ClaimID}\n" +
                              $"Type: {list.ClaimType}\n" +
                              $"Description: {list.Description}\n" +
                              $"Amount: {list.ClaimAmount}\n" +
                              $"Date Of Incident: {list.DateOfIncident}\n" +
                              $"Date Of Claim: {list.DateOfClaim}\n" +
                              $"IsValid: {list.IsValid}\n" +
                              $"Would you like to take this claim? (Y/N)");
            string choice = Console.ReadLine().ToLower();

            switch (choice)
            {
            case "y":
            case "yes":
                KomodoClaims list2 = _claimRepo.GetNextContent();
                break;

            default:
                break;
            }
        }
Exemple #2
0
        public void PeekNextContentTest()
        {
            KomodoClaimsRepository queueRepo = new KomodoClaimsRepository();
            KomodoClaims           content   = new KomodoClaims(1, ClaimType.Home, "Bad stuff happened", 400.34m, new DateTime(1989, 05, 19), new DateTime(1989, 5, 23), true);

            queueRepo.AddToQueue(content);
            KomodoClaims queueContent = queueRepo.PeekNextContent();

            Assert.AreSame(content, queueContent);
        }