public void ShouldGetCitiesStartsWithSpecifiedLetter() { CityListManager listManager = new CityListManager(); string path = @"..//..//adhed//CityTrainingTwo//Files//cities.txt"; listManager.LoadElements(path); List<City> listWithZ = listManager.GetCitiesStartsWithLetter("Z"); Assert.AreEqual(listWithZ.Count, 2); }
public void ShouldGetCitiesStartsWithSpecifiedLetter() { CityListManager listManager = new CityListManager(); string path = @"..//..//adhed//CityTrainingTwo//Files//cities.txt"; listManager.LoadElements(path); List <City> listWithZ = listManager.GetCitiesStartsWithLetter("Z"); Assert.AreEqual(listWithZ.Count, 2); }
public void ShouldLoadTheCitiesFromTxtFile() { GenericListManager <City> listManager = new CityListManager(); string path = @"..//..//adhed//CityTrainingTwo//Files//cities.txt"; listManager.LoadElements(path); List <City> list = listManager.GetList(); bool result = listManager.CheckElementExists("Pieszyce"); Assert.IsTrue(result); }
public void ShouldRemoveCityFromList() { CityListManager listManager = new CityListManager(); string path = @"..//..//adhed//CityTrainingTwo//Files//cities.txt"; listManager.LoadElements(path); var result1 = listManager.CheckElementExists("Karpacz"); listManager.RemoveElement("Karpacz"); var result2 = listManager.CheckElementExists("Karpacz"); Assert.IsFalse(result2); }
public void ShouldLoadTheCitiesFromTxtFile() { GenericListManager<City> listManager = new CityListManager(); string path = @"..//..//adhed//CityTrainingTwo//Files//cities.txt"; listManager.LoadElements(path); List<City> list = listManager.GetList(); bool result = listManager.CheckElementExists("Pieszyce"); Assert.IsTrue(result); }