Ejemplo n.º 1
0
        private void AddTestData()
        {
            Country japan         = countiresService.GetByDescription("JAPAN");
            Country germany       = countiresService.GetByDescription("GERMANY");
            Country usa           = countiresService.GetByDescription("USA");
            Country unitedKingdom = countiresService.GetByDescription("UNITED KINGDOM");
            Country france        = countiresService.GetByDescription("FRANCE");

            Manufacturer manufacturer = new Manufacturer("", "MAZDA", japan.PrimaryKey);

            manufacturersService.Save(ref manufacturer);

            manufacturer = new Manufacturer("", "VOLKSWAGEN", germany.PrimaryKey);
            manufacturersService.Save(ref manufacturer);

            manufacturer = new Manufacturer("", "FORD", usa.PrimaryKey);
            manufacturersService.Save(ref manufacturer);

            manufacturer = new Manufacturer("", "MERCEDES-BENZ", germany.PrimaryKey);
            manufacturersService.Save(ref manufacturer);

            manufacturer = new Manufacturer("", "PORSCHE", germany.PrimaryKey);
            manufacturersService.Save(ref manufacturer);

            manufacturer = new Manufacturer("", "JAGUAR", unitedKingdom.PrimaryKey);
            manufacturersService.Save(ref manufacturer);

            manufacturer = new Manufacturer("", "MCLAREN", unitedKingdom.PrimaryKey);
            manufacturersService.Save(ref manufacturer);

            manufacturer = new Manufacturer("", "ASTON MARTIN", unitedKingdom.PrimaryKey);
            manufacturersService.Save(ref manufacturer);

            manufacturer = new Manufacturer("", "BUGATTI", france.PrimaryKey);
            manufacturersService.Save(ref manufacturer);
        }
Ejemplo n.º 2
0
        public void A030_GetByDescription()
        {
            Country country = countriesService.GetByDescription(Country3.Description);

            Assert.AreEqual(Country3.PrimaryKey, country.PrimaryKey);
        }