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); }
private void AndSomeSessionsWithNoSpeakers() { _sessions = DomainData.GenerateSessions(new[] { 100, 101, 102 }, _speakers.Take(1).ToArray()); _httpHelper.Setup(m => m.FetchSessions()).Returns(Task.FromResult(_sessions)); }
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))); }
private void AndEqualAmountOfSessions() { _sessions = DomainData.GenerateSessions(new[] { 100, 101, 102 }, _speakers.ToArray()); _httpHelper.Setup(m => m.FetchSessions()).Returns(Task.FromResult(_sessions)); }