Example #1
0
        public PokeGymDbTestFixture()
        {
            Connection = new SqliteConnection("Datasource=:memory:");
            Connection.Open();

            var options = new DbContextOptionsBuilder <PokeGymContext>()
                          .UseSqlite(Connection)
                          .Options;

            Context = new PokeGymContext(options);
            Context.Database.EnsureCreated();

            DataHelper.SeedDatabase(Context);

            Repository = new PokeGymRepository(Context);
        }
Example #2
0
 public PokeGymController(PokeGymRepository pokeGymRepository, PokeDexClient pokeDexClient)
 {
     this.pokeGymRepository = pokeGymRepository;
     this.pokeDexClient     = pokeDexClient;
 }