public async Task DisplayCharactersFromApi() { var service = new StarWarsCharacterDisplayService( new StarWarsApiCharacterSourceAdapter(new StarWarsApi())); var result = await service.ListCharacters(); _output.WriteLine(result); }
public async Task DisplayCharactersFromFile() { string filename = @"Adapter/People.json"; var service = new StarWarsCharacterDisplayService( new CharacterFileSourceAdapter(filename, new CharacterFileSource())); var result = await service.ListCharacters(); _output.WriteLine(result); }