コード例 #1
0
        public void CreateBulgariaMethod_ShouldMakeBulgaria_WhenCalled()
        {
            ICountry bulgaria = CountryFactory.CreateBulgaria();

            Assert.AreEqual(bulgaria.CountryName, "Bulgaria");
            Assert.AreEqual(bulgaria.CapitalName, "Sofia");
            Assert.AreEqual(bulgaria.CountryInfo,
                            "Official languages: Bulgarian\n" +
                            "Government: Unitary parliamentary republic\n" +
                            "Area: 110,993.6 km2\n" +
                            "Population: 7,050,034");
            Assert.AreEqual(bulgaria.CountryPath, @"Images\Countries\bulgaria.png");
        }
コード例 #2
0
        public void LoadCountries()
        {
            ICountry italy    = CountryFactory.CreateItaly();
            ICountry france   = CountryFactory.CreateFrance();
            ICountry bulgaria = CountryFactory.CreateBulgaria();
            ICountry serbia   = CountryFactory.CreateSerbia();
            ICountry germany  = CountryFactory.CreateGermany();
            ICountry brazil   = CountryFactory.CreateBrazil();

            countries.Add(italy);
            countries.Add(france);
            countries.Add(bulgaria);
            countries.Add(serbia);
            countries.Add(germany);
            countries.Add(brazil);

            CountriesDB.Countries = countries;

            ConvertInNewCountry();
        }