Esempio n. 1
0
        public async Task DisplayCharactersFromApi()
        {
            var service = new StarWarsCharacterDisplayService(
                new StarWarsApiCharacterSourceAdapter(new StarWarsApi()));

            var result = await service.ListCharacters();

            _output.WriteLine(result);
        }
Esempio n. 2
0
        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);
        }