Ejemplo n.º 1
0
        public void ChangeData_should_changeTypeOfRealty()
        {
            string newType;
            string typeOfRealty;

            CreateRealties();
            newType = "4 room";
            realtyManagement.ChangeData(2, 1, newType);
            typeOfRealty = realtyManagement.ShowRealties[2].RealtyType;
            Assert.AreEqual(newType, typeOfRealty);
        }
Ejemplo n.º 2
0
 public void ChangeData()
 {
     try
     {
         Console.WriteLine("Write realty's index:");
         int index = Convert.ToInt32(Console.ReadLine());
         Console.WriteLine("Write 1 if you want to change type of realty, 2 - cost:");
         int field = Convert.ToInt32(Console.ReadLine());
         Console.WriteLine("Write new data:");
         string newData = Console.ReadLine();
         realtyManagement.ChangeData(index, field, newData);
     }
     catch
     {
         Console.WriteLine("Incorrect input!!!");
         Console.WriteLine("Try again");
     }
 }