public async Task ListCharactersGivenStarWarsApiAdapterShouldReturnSomething() { var swAdapter = new StarWarsApiPeopleAdapter(); var service = new StarWarsCharacterDisplayService(swAdapter); await CallListCharactersAndAssertContainsExpectedCharacters(service).ConfigureAwait(false); }
private static async Task CallListCharactersAndAssertContainsExpectedCharacters(StarWarsCharacterDisplayService service) { var result = await service.ListCharacters().ConfigureAwait(false); Assert.Contains("Luke Skywalker", result, StringComparison.OrdinalIgnoreCase); Assert.Contains("Darth Vader", result, StringComparison.OrdinalIgnoreCase); }