Exemple #1
0
        public void Get_LibraryCard_By_Id()
        {
            var mockSet = BuildMock();
            var mockCtx = new Mock <LibraryDbContext>();

            mockCtx.Setup(c => c.LibraryCards).Returns(mockSet.Object);

            var sut         = new LibraryCardService(mockCtx.Object);
            var queryResult = sut.Get(2);

            queryResult.Should().BeEquivalentTo(new LibraryCard {
                Id = 2
            });
        }