Esempio n. 1
0
 public void ThenRequestRepositoryGetRequestsBySenderIdShouldHaveBeenCalled()
 => RequestsRepository.Verify(repo => repo.GetRequestsByReceiverId(_userId), Times.Once);
Esempio n. 2
0
 public void ThenRequestsRepositoryGetRequestByUserIdsAndTypeShouldHaveBeenCalled()
 => RequestsRepository.Verify(repository => repository.GetRequestByUserIdsAndType(It.IsAny <Request>()), Times.Once);
Esempio n. 3
0
 public void ThenRequestsRepositoryGetRequestByUserIdsAndTypeShouldNotHaveBeenCalled()
 => RequestsRepository.Verify(
     repository =>
     repository.GetRequestByUserIdsAndType(It.IsAny <Guid>(), It.IsAny <Guid>(),
                                           It.IsAny <RequestType>()), Times.Never);
Esempio n. 4
0
 public void ThenRequestsRepositoryGetRequestByUserIdsAndTypeShouldHaveBeenCalled()
 => RequestsRepository.Verify(
     repository =>
     repository.GetRequestByUserIdsAndType(_userId, _senderId, (RequestType)RequestTypeId), Times.Once);
Esempio n. 5
0
 public void ThenRequestRepositoryCreateRequestShouldNotHaveBeenCalled()
 => RequestsRepository.Verify(repo => repo.CreateRequest(It.IsAny <Request>()), Times.Never);
Esempio n. 6
0
 public void ThenRequestRepositoryCreateRequestShouldHaveBeenCalled()
 => RequestsRepository.Verify(repo => repo.CreateRequest(It.Is <Request>(request =>
                                                                         request.SenderId == _requestRequest.SenderId && request.ReceiverId == _requestRequest.ReceiverId && request.RequestType == (RequestType)_requestRequest.RequestTypeId)));
Esempio n. 7
0
 public void ThenRequestsRepositoryDeleteRequestShouldHaveBeenCalled()
 => RequestsRepository.Verify(
     repository => repository.DeleteRequest(_request.SenderId, _request.ReceiverId, RequestType.Friend), Times.Once);