public void RemoveCvCity(CvCity cvCity) { if (_listCvCity != null) { _listCvCity.Remove(cvCity); } CalculateInformations(); }
/// <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(); }
/// <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)); }
public void Init() { _population = 30; _name = "konigberg"; _cvCity = new CvCity(_name, _population); }
/// <summary> /// Initialize the object Country /// </summary> public void Init() { _name = "Germany"; _country = new Country(_name); _cvCity = new CvCity("konigsberg", 30); }