예제 #1
0
            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);
            }
예제 #2
0
            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();
            }
예제 #3
0
 public NotesListLogicImpl(INotesHeadersListRepository headerRepo, INotesDetailsListRepository detailRepo)
 {
     _headerRepo = headerRepo;
     _detailRepo = detailRepo;
 }