Exemplo n.º 1
0
        public void GetQueueTest()
        {
            _testClaimsRepo = new Claim_Repo();

            _testClaimsRepo.CreateNew(testClaim);

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

            foreach (Claim Claim in getTestQueues)
            {
                Assert.IsNotNull(Claim);
            }
        }
Exemplo n.º 2
0
        public void TestMethod1()
        {
            _testClaimsRepo = new Claim_Repo();

            _testClaimsRepo.CreateNew(testClaim);

            Queue <Claim> queContent = _testClaimsRepo.();

            foreach (Claim Claim in queContent)
            {
                Assert.IsNotNull(Claim);
            }
        }
Exemplo n.º 3
0
        private void NewClaim()
        {
            Claim claim = new Claim();

            Console.Clear();

            Console.WriteLine("************************\n"
                              + "Enter Claim Number.\n" +
                              "****************************");
            claim.ClaimNum = Console.ReadLine();

            Console.WriteLine("*****************************************\n" +
                              "Enter the claim type.......................\n" +
                              "*****************************************");
            claim.ClaimType = Console.ReadLine();

            Console.WriteLine("*****************************************\n" +
                              "Enter the description of the claim.........\n" +
                              "*****************************************");
            claim.Description = Console.ReadLine();

            Console.WriteLine("*****************************************\n" +
                              "Enter the date the incident took place.....\n" +
                              "*****************************************");
            claim.ReportDate = Console.ReadLine();

            Console.WriteLine($"*****************************************\n" +
                              "Enter the date the customer made the claim.\n" +
                              "****************************************");
            claim.DateOfClaim = Console.ReadLine();

            Console.WriteLine($"*****************************************\n" +
                              "Enter the amount paid for the claim........\n" +
                              "***************************************");

            string conversion = Console.ReadLine();

            claim.ClaimPrice = decimal.Parse(conversion);

            bool isFalse = false;

            while (isFalse == false)
            {
                Console.WriteLine($"********************************\n" +
                                  "Is your selected claim valid? Enter 'yes or no'\n" +
                                  "***********************************");
                string answer = Console.ReadLine().ToLower();
                if (answer == "yes")
                {
                    claim.IsTrue = true;
                    isFalse      = true;
                }
                else if (answer == "no")
                {
                    claim.IsTrue = false;
                    isFalse      = true;
                }
                else
                {
                    Console.WriteLine($"***************************************\n" +
                                      "Please enter a valid responce 'YES or NO'\n" +
                                      "***************************************");
                }
            }


            _claims.CreateNew(claim);
        }