public static void TestFixtureSetup(TestContext context)
        {
            con = new NpgsqlConnection(cs);
            con.Open();

            regionsRepository       = new RegionsRepository(con);
            countriesRepository     = new CountriesRepository(con);
            manufacturersRepository = new ManufacturersRepository(con);

            regionsRepository.Save(Region1);
            regionsRepository.Save(Region2);
            regionsRepository.Save(Region3);
            regionsRepository.Flush();

            countriesRepository.Save(Country1);
            countriesRepository.Save(Country2);
            countriesRepository.Save(Country3);
            countriesRepository.Save(Country4);
            countriesRepository.Save(Country5);
            countriesRepository.Flush();
        }
예제 #2
0
 /// <summary>Initializes a new instance of the <see cref="ManufacturerValidation"/> class.</summary>
 /// <param name="npgsqlConnection">The NPGSQL connection.</param>
 public ManufacturerValidation(NpgsqlConnection npgsqlConnection) : base(npgsqlConnection)
 {
     manufacturersRepository = new ManufacturersRepository(npgsqlConnection);
     countriesRepository     = new CountriesRepository(npgsqlConnection);
     carsRepository          = new CarsRepository(npgsqlConnection);
 }