public void EnsureGetUserId_uses_retry_strategy() { _apiExecutorMock.Setup(obj => obj.Execute(It.IsAny <Func <string, SessionInfo> >(), "sessionToken")) .Returns(new SessionInfo(12345)); _sessionApi.GetUserId(); _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, SessionInfo> >(), "sessionToken")); }
public void EnsureGetUserId_uses_retry_strategy() { _apiExecutorMock.Setup(obj => obj.Execute(It.IsAny <Func <string, CancellationToken, Task <SessionInfo> > >(), "sessionToken", default(CancellationToken))) .Returns(new SessionInfo() { UserId = 12345 }); _sessionApi.GetUserId(); _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, CancellationToken, Task <SessionInfo> > >(), "sessionToken", default(CancellationToken))); }