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