Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public void ShouldCityNotExists()
        {
            GenericListManager <City> listManager = new CityListManager();
            bool result = listManager.CheckElementExists("Karpacz");

            Assert.IsFalse(result);
        }
Exemplo n.º 3
0
        public void ShouldCityNotExists()
        {
            GenericListManager<City> listManager = new CityListManager();
            bool result = listManager.CheckElementExists("Karpacz");

            Assert.IsFalse(result);
        }
Exemplo n.º 4
0
        public void ShouldCityExists()
        {
            GenericListManager <City> listManager = new CityListManager();
            City city = new City("Karpacz");

            listManager.AddElement(city);

            bool result = listManager.CheckElementExists("Karpacz");

            Assert.IsTrue(result);
        }
Exemplo n.º 5
0
        public void ShouldCityExists()
        {
            GenericListManager<City> listManager = new CityListManager();
            City city = new City("Karpacz");

            listManager.AddElement(city);

            bool result = listManager.CheckElementExists("Karpacz");

            Assert.IsTrue(result);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
        public void ShouldJoinTheList()
        {
            GenericListManager <City> listManager = new CityListManager();

            City city1 = new City("Karpacz");
            City city2 = new City("Waszyngton");
            City city3 = new City("Świebodzin");

            listManager.AddElement(city1);

            List <City> anotherList = new List <City>();

            anotherList.Add(city2);
            anotherList.Add(city3);

            listManager.JoinList(anotherList);

            //check that city from another list exists in main list after the join process
            bool result = listManager.CheckElementExists("Waszyngton");

            Assert.IsTrue(result);
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
0
        public void ShouldJoinTheList()
        {
            GenericListManager<City> listManager = new CityListManager();

            City city1 = new City("Karpacz");
            City city2 = new City("Waszyngton");
            City city3 = new City("Świebodzin");

            listManager.AddElement(city1);

            List<City> anotherList = new List<City>();
            anotherList.Add(city2);
            anotherList.Add(city3);

            listManager.JoinList(anotherList);

            //check that city from another list exists in main list after the join process
            bool result = listManager.CheckElementExists("Waszyngton");

            Assert.IsTrue(result);
        }