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); }
public void Arrange() { string dateOneFirst = "4/25/18"; DateTime date1 = DateTime.Parse(dateOneFirst); string dateOneSecond = "4/27/18"; DateTime date2 = DateTime.Parse(dateOneSecond); _content = new KomodoClaims(1, "Car", "Car accident on 465.", 400.00, date1, date2, true); _repo = new KomodoClaimsRepository(); _repo.EnterNewClaimInfo(_content); }
public void AddAndGetAllQueueTest() { 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); Queue <KomodoClaims> list = queueRepo.GetAllQueue(); var expected = 1; var actual = list.Count; Assert.AreEqual(expected, actual); }
public void EnterNewClaim_ReturnNotNull() { KomodoClaims content = new KomodoClaims(); content.ClaimType = "Car"; KomodoClaimsRepository repository = new KomodoClaimsRepository(); repository.EnterNewClaimInfo(content); string dateOneFirst = "4/25/18"; DateTime date1 = DateTime.Parse(dateOneFirst); string dateOneSecond = "4/27/18"; DateTime date2 = DateTime.Parse(dateOneSecond); // KomodoClaims contentFromClaim = repository.EnterNewClaimInfo("Car"); Assert.IsNotNull(content); }