public void EnsureAccept_uses_api_executor() { var userId = 12345; _connectionApi.Accept(userId); _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, UserConnectionRequest, UserConnection> >(), "sessionToken", new UserConnectionRequest(userId))); }
public void EnsureAccept_uses_api_executor() { var userId = 12345; _apiExecutorMock.Setup(obj => obj.Execute(It.IsAny <Func <string, UserConnectionRequest, UserConnection> >(), "sessionToken", It.IsAny <UserConnectionRequest>())) .Returns(new UserConnection(userId, UserConnection.StatusEnum.ACCEPTED, 0, 0, 0)); _connectionApi.Accept(userId); _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, UserConnectionRequest, UserConnection> >(), "sessionToken", new UserConnectionRequest(userId))); }
public void EnsureAccept_uses_api_executor() { var userId = 12345; _apiExecutorMock.Setup(obj => obj.Execute(It.IsAny <Func <string, UserConnectionRequest, CancellationToken, Task <UserConnection> > >(), "sessionToken", It.IsAny <UserConnectionRequest>(), default(CancellationToken))) .Returns(new UserConnection() { UserId = userId, Status = UserConnectionStatus.ACCEPTED }); _connectionApi.Accept(userId); _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, UserConnectionRequest, CancellationToken, Task <UserConnection> > >(), "sessionToken", It.IsAny <UserConnectionRequest>(), default(CancellationToken))); }