public void GoodDetail_DoesNotSaveSetCreatedDate() { // arrange DateTime expected = new DateTime(2017, 7, 3, 14, 46, 0, DateTimeKind.Utc); INotesDetailsListRepository repo = MakeRepo(); // act repo.Save(MakeDetail()); List<NotesListDetail> details = repo.GetAll(GOOD_HEADER_ID); // assert details.First(x => x.ItemNumber.Equals(NEW_ITEM_NUMBER)) .CreatedUtc .Should() .NotBe(expected); }
public void PartialDetail_ReturnsNullEach() { // arrange INotesDetailsListRepository repo = MakeRepo(); // act NotesListDetail detail = MakeDetail(); detail.Each = null; repo.Save(detail); List<NotesListDetail> details = repo.GetAll(GOOD_HEADER_ID); // assert details.First(x => x.ItemNumber.Equals(NEW_ITEM_NUMBER)) .Each .Should() .BeNull(); }
public NotesListLogicImpl(INotesHeadersListRepository headerRepo, INotesDetailsListRepository detailRepo) { _headerRepo = headerRepo; _detailRepo = detailRepo; }