Esempio n. 1
0
        public void FindReceiptInclude()
        {
            Receipt receipt = new Receipt
            {
                Book = new Book {
                    Author = "Автор", Id = 1, Name = "Name"
                },
                BookId     = 1,
                Date       = DateTime.Now,
                UserId     = 1,
                DateReturn = DateTime.Now,
                Id         = 1,
                User       = new User {
                    Birthday = DateTime.Now, Id = 1, Name = "Name"
                }
            };

            _repository = new ReceiptRepository(new LibContext());
            _repository.Create(receipt);
            // Act
            var result = _repository.FindReceiptInclude(receipt.Id);

            // Assert
            Assert.IsNotNull(result);
        }