Exemplo n.º 1
0
        public void ReturnTape()
        {
            // arrange
            int tapeId   = 1;
            int friendId = 1;

            _tapeRepositoryMock.Setup(method => method.ReturnTape(tapeId, friendId));

            // act
            _tapeService.ReturnTape(tapeId, friendId);

            // assert
            _tapeRepositoryMock.Verify(x => x.ReturnTape(tapeId, friendId), Times.Once);
        }
Exemplo n.º 2
0
 public void ReturnTape_ShouldCallReturnTapeInBorrowRecordRepository()
 {
     _tapeService.ReturnTape(1, 1);
     _mockBorrowRecordRepository.Verify(mock => mock.ReturnTape(It.IsAny <int>()), Times.Once());
 }
Exemplo n.º 3
0
 public IActionResult ReturnTape(int?tapeId, int?friendId)
 {
     _tapeService.ReturnTape(tapeId, friendId);
     return(StatusCode(204));
 }
Exemplo n.º 4
0
 public IActionResult ReturnTape(int userId, int tapeId)
 {
     _tapeService.ReturnTape(tapeId, userId);
     return(NoContent());
 }