Example #1
0
 public void RemoveCvCity(CvCity cvCity)
 {
     if (_listCvCity != null)
     {
         _listCvCity.Remove(cvCity);
     }
     CalculateInformations();
 }
Example #2
0
 /// <summary>
 /// Check if there is already a list of city
 /// Add a new list if there is no list
 /// Add a city to the list
 /// </summary>
 /// <param name="cvCity"></param>
 public void NewCvCity(CvCity cvCity)
 {
     if (_listCvCity == null)
     {
         this._listCvCity = new List <CvCity>();
     }
     _listCvCity.Add(cvCity);
     CalculateInformations();
 }
Example #3
0
        /// <summary>
        /// Test ListCvCity
        /// </summary>
        public void TestListCvCity()
        {
            //
            _listCvCity = new List <CvCity>();
            CvCity city = new CvCity("konigsberg", 30);

            _listCvCity.Add(city);

            _country.NewCvCity(_cvCity);
            List <CvCity> lstActual = _country.ListCvCity;

            Assert.IsTrue(AreEquivalent(_listCvCity, lstActual));
        }
Example #4
0
 public void Init()
 {
     _population = 30;
     _name       = "konigberg";
     _cvCity     = new CvCity(_name, _population);
 }
Example #5
0
 /// <summary>
 /// Initialize the object Country
 /// </summary>
 public void Init()
 {
     _name    = "Germany";
     _country = new Country(_name);
     _cvCity  = new CvCity("konigsberg", 30);
 }