public void ReturnCorrectImage_IfPassedIdIsCorrect() { // Arrange var dbSetMock = new Mock <ILibrarySystemEfWrapper <Image> >(); var imageServices = new ImageServices(dbSetMock.Object); var imageMock = new Mock <Image>(); // Act imageServices.GetById(imageMock.Object.Id); // Assert dbSetMock.Verify(r => r.GetById(imageMock.Object.Id), Times.Once); }