Example #1
0
        private void Menu()
        {
            Queue <Claim> queContent = _claimContent.GetQueue();

            bool keepRunning = true;

            while (keepRunning)
            {
                //display our options to the user
                Console.WriteLine("\nSelect a Menu Option:\n" +
                                  "1. See All Claims.\n" +
                                  "2. Take Care of Next Claim.\n" +
                                  "3. Enter a New Claim.\n" +
                                  "4. Exit.\n");

                // get the user's input
                string input = Console.ReadLine();

                switch (input)
                {
                case "1":
                    // see all claims
                    QueueContents(queContent);
                    break;

                case "2":
                    // take care of next claim
                    HandleNextClaim();
                    break;

                case "3":
                    // enter a new claim
                    CreateNewClaim();
                    break;

                case "4":
                    // exit
                    Console.WriteLine("Exiting Now...");
                    keepRunning = false;
                    break;

                default:
                    Console.WriteLine("Please Enter a Valid Number.");
                    break;
                }
                Console.WriteLine("Press Any Key to Continue...\n");
                Console.ReadKey();
                Console.Clear();
            }
        }
Example #2
0
        public void GetQueueTest()
        {
            _testClaimsRepo = new ClaimsRepositiory();

            _testClaimsRepo.AddContentToQue(testClaim);

            Queue <Claim> getTestQueues = _testClaimsRepo.GetQueue();

            foreach (Claim Claim in getTestQueues)
            {
                Assert.IsNotNull(Claim);
            }
        }
Example #3
0
        public void AddQueueContentTest()
        {
            _testClaimsRepo = new ClaimsRepositiory();

            _testClaimsRepo.AddContentToQue(testClaim);

            Queue <Claim> queContent = _testClaimsRepo.GetQueue();

            foreach (Claim Claim in queContent)
            {
                Assert.IsNotNull(Claim);
            }
        }
Example #4
0
        public void CopyContentQueTest()
        {
            _testClaimsRepo = new ClaimsRepositiory();

            Queue <Claim> testQueue = new Queue <Claim>();

            testQueue.Enqueue(testClaim);

            _testClaimsRepo.CopyContentQue(testQueue);

            Queue <Claim> getTestQueues = _testClaimsRepo.GetQueue();

            foreach (Claim Claim in getTestQueues)
            {
                Assert.IsNotNull(Claim);
            }
        }