Пример #1
0
        public async Task it_displays_characters_from_Api_with_Adapter_pattern()
        {
            var starWarsApiCharacterSourceAdapter = new StarWarsApiCharacterSourceAdapter();
            var service = new StarWarsCharacterDisplayServiceWithAdapter(starWarsApiCharacterSourceAdapter);

            var result = await service.ListCharacters();

            _testOutputHelper.WriteLine(result);
        }
Пример #2
0
        public async Task it_displays_characters_from_file_with_adapter_pattern()
        {
            var characterFileSourceAdapter = new CharacterFileSourceAdapter(@"AdapterPattern/People.json");
            var service = new StarWarsCharacterDisplayServiceWithAdapter(characterFileSourceAdapter);

            var result = await service.ListCharacters();

            _testOutputHelper.WriteLine(result);
        }