public async Task GetConferences() { var fixture = new Fixture(); var tekconfApi = new Mock<ITekConfApi>(); var expectedConferences = new List<ConferenceDto> { fixture.Create<ConferenceDto>() }; tekconfApi.Setup(x => x.GetConferences()).ReturnsAsync(expectedConferences); var apiService = new Mock<IApiService>(); var service = new ConferencesService(apiService.Object); var conferences = await service.GetConferences(Priority.UserInitiated); conferences.ShouldNotBeNull(); conferences.Count().ShouldEqual(1); tekconfApi.Verify(x => x.GetConferences(), Times.Exactly(1)); }