コード例 #1
0
 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"));
 }
コード例 #2
0
 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)));
 }