private void AddNewClaim() { Claims content = new Claims(); _console.WriteLine("Enter the ClaimID"); int ClaimID = int.Parse(_console.ReadLine()); _console.WriteLine("Enter the claim type"); string ClaimType = _console.ReadLine(); int TypeOfClaim = int.Parse(ClaimType); content.TypeOfClaim = (ClaimType)TypeOfClaim; _console.WriteLine("Enter a claim description"); content.Description = _console.ReadLine(); _console.WriteLine("Ammount of Damage"); int ClaimAmmount = int.Parse(_console.ReadLine()); _console.WriteLine("Date Of Accident"); DateTime DateOfIncident = DateTime.Parse(_console.ReadLine()); _console.WriteLine("Date of Claim"); DateTime DateOfClaim = DateTime.Parse(_console.ReadLine()); _claimsRepo.AddClaimToDirectory(content); _console.WriteLine("Your claim has been added. Press any key to return to main menu"); _console.ReadKey(); }
public void AddToClaims() { Claims content = new Claims(); ClaimsRepo repository = new ClaimsRepo(); bool addResult = repository.AddClaimToDirectory(_content); Assert.IsTrue(addResult); }
public void GetClaim_ShouldReturnCorrectClaim() { Claims content = new Claims(); ClaimsRepo repo = new ClaimsRepo(); repo.AddClaimToDirectory(content); Queue <Claims> contents = repo.GetAllClaims(); bool claimHasContent = contents.Contains(content); Assert.IsTrue(claimHasContent); }