Exemplo n.º 1
0
        public LibrariesControllerTests()
        {
            var libService  = MockLibraryService.GetMockLibraryServiceInstance();
            var bookService = new MockBookService();

            controller = new LibrariesController(libService.Object, bookService);
        }
Exemplo n.º 2
0
        public async Task ExistsWithId_Test(int id, bool expectedResult)
        {
            // arrange
            MockBookService service = new MockBookService();

            // act
            bool actualResult = await service.ExistsWithId(id);

            // assert
            Assert.AreEqual(expectedResult, actualResult);
        }