示例#1
0
        public void GetTapesForUserOnLoan_ReturnsAllTapesCurrentlyOnLoan()
        {
            List <int> tapeIdsForTapesUserWithId1CurrentlyHasOnLoan = new List <int>()
            {
                1, 2
            };
            var tapes = _tapeService.GetTapesForUserOnLoan(1);

            Assert.AreEqual(tapeIdsForTapesUserWithId1CurrentlyHasOnLoan.Count, tapes.Count());
            foreach (var tapeId in tapeIdsForTapesUserWithId1CurrentlyHasOnLoan)
            {
                Assert.IsNotNull(tapes.FirstOrDefault(t => t.Id == tapeId));
            }
        }
示例#2
0
        public IActionResult GetUserBorrowRecords(int id)
        {
            var BorrowRecords = _tapeService.GetTapesForUserOnLoan(id);

            return(Ok(BorrowRecords));
        }