Пример #1
0
 public PokedexViewModel(IPokemonRegistry pokemonRegistry,
                         PokeTypeRegistry pokeTypeRegistry,
                         IPokePdfService pokePdfService)
 {
     this.pokemonRegistry  = pokemonRegistry;
     this.pokeTypeRegistry = pokeTypeRegistry;
     this.pokePdfService   = pokePdfService;
     LoadPokemonTask       = LoadAsync();
 }
Пример #2
0
 public PokedexViewModel(IPokemonRegistry pokemonRegistry,
                         PokeTypeRegistry pokeTypeRegistry,
                         IPokePdfService pokePdfService,
                         IPokemonExcelService pokemonExcelService)
 {
     this.pokemonRegistry     = pokemonRegistry;
     this.pokeTypeRegistry    = pokeTypeRegistry;
     this.pokePdfService      = pokePdfService;
     this.pokemonExcelService = pokemonExcelService;
     PokeTypeErrorVisibility  = Visibility.Hidden;
     LoadPokemonTask          = LoadAsync();
 }
Пример #3
0
 public void setup()
 {
     pokeTypeConstants = new PokeTypeRegistry();
     mockPdfService    = new Mock <IPokePdfService>();
     mockExcelService  = new Mock <IPokeExcelService>();
     samplePokemonList = new List <Pokemon>();
     samplePokemonList.Add(new Pokemon
     {
         Name  = "aaa",
         Type1 = pokeTypeConstants.Fire
     });
     samplePokemonList.Add(new Pokemon
     {
         Name  = "bbb",
         Type1 = pokeTypeConstants.Water
     });
     samplePokemonList.Add(new Pokemon
     {
         Name  = "ccc",
         Type1 = pokeTypeConstants.Dragon
     });
     samplePokemonList.Add(new Pokemon
     {
         Name  = "ddd",
         Type1 = pokeTypeConstants.Electric
     });
     samplePokemonList.Add(new Pokemon
     {
         Name  = "dab",
         Type1 = pokeTypeConstants.Dark,
         Type2 = pokeTypeConstants.Electric
     });
     samplePokemonList.Add(new Pokemon
     {
         Name  = "dac",
         Type1 = pokeTypeConstants.Electric,
         Type2 = pokeTypeConstants.Bug
     });
     mockPokeRegistry = new Mock <IPokemonRegistry>();
     mockPokeRegistry.Setup(r => r.GetAllPokemonAsync()).ReturnsAsync(samplePokemonList);
 }