public void A010_SaveNewTest()
        {
            countriesRepository.SaveAndFlush(Country1);

            Country countryCheck = countriesRepository.GetById(Country1.PrimaryKey);

            Assert.IsNotNull(countryCheck);
            Assert.AreEqual(Country1.PrimaryKey, countryCheck.PrimaryKey);
            Assert.AreEqual(Country1.Description, countryCheck.Description);
            Assert.AreEqual(Country1.RegionKey, countryCheck.RegionKey);
        }
예제 #2
0
        public static void TestFixtureSetup(TestContext context)
        {
            con = new NpgsqlConnection(cs);
            con.Open();

            regionValidation    = new RegionValidation(con);
            regionsRepository   = new RegionsRepository(con);
            countriesRepository = new CountriesRepository(con);

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

            countriesRepository.SaveAndFlush(Country3);
        }