예제 #1
0
        public async Task BorrowBooks_ReturnsTrue()
        {
            _userBookDMList = new List <DataModel.UserBook>();
            _mockLibraryRepo.Setup(x => x.GetStockBooks(It.IsAny <List <int> >())).ReturnsAsync(_bookStoreDMList);
            _mockLibraryRepo.Setup(x => x.GetUserBooks(It.IsAny <int>())).ReturnsAsync(_userBookDMList);
            _mockLibraryRepo.Setup(x => x.BorrowBooks(It.IsAny <List <DataModel.UserBook> >(), It.IsAny <List <DataModel.BookStore> >())).ReturnsAsync(true);

            var response = await _libraryLogic.BorrowBooks(_borrowBook);

            Assert.IsTrue(response);
        }