Exemplo n.º 1
0
        public void Test_DequeueClaim()
        {
            //Arrange
            SeedClaimQueue();
            Queue <Claims> queueOfClaims = new Queue <Claims>();
            int            initialCount  = queueOfClaims.Count;
            bool           wasDequeued;

            //Act
            queueOfClaims.Peek();
            repo.DequeueClaim();
            wasDequeued = (initialCount < queueOfClaims.Count) ? true : false;
            //Assert
            Assert.IsFalse(wasDequeued);
        }
Exemplo n.º 2
0
        private void TakeCareOfClaim()
        {
            Console.Write("\nDo you want to deal with this claim now? (y/n)");
            string response = Console.ReadLine();

            if (response == "y")
            {
                repo.DequeueClaim();
                Console.WriteLine("Thank you for taking care of the claim. \nThis claim has now been removed.");
                Console.ReadKey();
            }
            else if (response == "n")
            {
                Console.WriteLine("The claim will remain at the top of the queue. \nPlease take care of the claim when you are ready.");
                Console.ReadKey();
                Menu();
            }
            else
            {
                Console.WriteLine("Please enter 'y' for yes or 'n' for no...");
                TakeCareOfClaim();
            }
        }