Пример #1
0
        private async void WhenACallIsMadeToFilterSessionBasedOnId()
        {
            _sessions = DomainData.GenerateSessions(new[] { 100, 101, 102 }, Enumerable.Empty <Speaker>().ToArray());
            _httpHelper.Setup(m => m.FetchSessions()).Returns(Task.FromResult(_sessions));

            _httpHelper.Setup(m => m.FetchSession(It.IsAny <int>())).Returns(Task.FromResult(Task.FromResult(_description)));
            _apiService      = new BoqApiService(_httpHelper.Object);
            _returnedSession = await _apiService.GetSession(100);
        }
Пример #2
0
 private void AndSomeSessionsWithNoSpeakers()
 {
     _sessions = DomainData.GenerateSessions(new[] { 100, 101, 102 }, _speakers.Take(1).ToArray());
     _httpHelper.Setup(m => m.FetchSessions()).Returns(Task.FromResult(_sessions));
 }
Пример #3
0
 private async void WhenASessionDoesntExist()
 {
     _sessions = DomainData.GenerateSessions(new[] { 100, 101, 102 }, Enumerable.Empty <Speaker>().ToArray());
     _httpHelper.Setup(m => m.FetchSessions()).Returns(Task.FromResult(_sessions));
     _httpHelper.Setup(m => m.FetchSession(It.IsAny <int>())).Returns(Task.FromResult(Task.FromResult <string>(null)));
 }
Пример #4
0
 private void AndEqualAmountOfSessions()
 {
     _sessions = DomainData.GenerateSessions(new[] { 100, 101, 102 }, _speakers.ToArray());
     _httpHelper.Setup(m => m.FetchSessions()).Returns(Task.FromResult(_sessions));
 }