Пример #1
0
        public void EnsureGetPresence_uses_retry_strategy()
        {
            const long uid = 1;

            _presenceApi.GetPresence(uid);
            _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <long?, string, Presence> >(), (long?)uid, "sessionToken"));
        }
Пример #2
0
        public void EnsureGetPresence_uses_retry_strategy()
        {
            const long uid = 1;

            _apiExecutorMock.Setup(obj => obj.Execute(It.IsAny <Func <long?, string, Generated.OpenApi.PodApi.Model.Presence> >(), (long?)uid, "sessionToken"))
            .Returns(new Generated.OpenApi.PodApi.Model.Presence(Generated.OpenApi.PodApi.Model.Presence.CategoryEnum.AVAILABLE));
            _presenceApi.GetPresence(uid);
            _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <long?, string, Generated.OpenApi.PodApi.Model.Presence> >(), (long?)uid, "sessionToken"));
        }
Пример #3
0
        public void EnsureGetPresence_uses_retry_strategy()
        {
            const long uid = 1;

            _apiExecutorMock.Setup(obj => obj.Execute(It.IsAny <Func <long, string, CancellationToken, Task <Generated.OpenApi.PodApi.Presence> > >(), uid, "sessionToken", default(CancellationToken)))
            .Returns(new Generated.OpenApi.PodApi.Presence()
            {
                Category = Generated.OpenApi.PodApi.PresenceCategory.AVAILABLE
            });
            _presenceApi.GetPresence(uid);
            _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <long, string, CancellationToken, Task <Generated.OpenApi.PodApi.Presence> > >(), uid, "sessionToken", default(CancellationToken)));
        }