static void Main(string[] args) { #region Main int choice; bool exit = false; do { PrintMenu(); choice = int.Parse(Console.ReadLine()); switch (choice) { case 0: { Console.WriteLine("Chose exit."); exit = true; break; } case 1: Console.WriteLine("Test logging in to humanity with correct info."); HumanityLoginTests.LoginToHumanity(); break; case 2: Console.WriteLine("Automatic test logging in to humanity with incorrect info."); HumanityLoginTests.AutomaticLoginToHumanity(); break; case 3: Console.WriteLine("Adding one new employee."); HumanityAddNewEmployeeTests.AddNewEmployee(); break; case 4: Console.WriteLine("Adding multiple new employees."); HumanityAddNewEmployeeTests.AutoAddMultipleEmployees(); break; case 5: Console.WriteLine("Edditing employee."); HumanityEditEmployeeTest.EditEmployee(); break; case 6: Console.WriteLine("Changing Settings."); HumanitySettingsTest.ChangingSettings(); break; case 7: Console.WriteLine("Signing out of Humanity."); HumanitySignOutTest.SigningOut(); break; } }while (!exit); #endregion }
static void Main(string[] args) { int izbor = -1; bool izlaz = false; int waitInMilliseconds = 1000; do { PrintMenu(); try { izbor = int.Parse(Console.ReadLine()); } catch (Exception e) { izbor = -1; Console.WriteLine(e.ToString()); Console.WriteLine("Unesite cifru "); Thread.Sleep(waitInMilliseconds); } switch (izbor) { case 0: { Console.WriteLine("Izabrali ste izlaz"); izlaz = true; break; } case 1: { Console.WriteLine("Izabrali ste odlazak na Home Page i logovanje korisnika"); Thread.Sleep(waitInMilliseconds); TestLogin.TestFillForm(); break; } case 2: { Console.WriteLine("Izabrali ste logovanje korisnika iz Excel tabele"); Thread.Sleep(waitInMilliseconds); TestLoginExcell.TestLoginUsers(); break; } case 3: { Console.WriteLine("Sginout test"); Thread.Sleep(waitInMilliseconds); SignOutTest.TestSignOut(); break; } case 4: { Console.WriteLine("Testiranje dodavanja novog zaposlenog"); Thread.Sleep(waitInMilliseconds); AddEmployeesTest.TestAddEmployees(); break; } case 5: { Console.WriteLine("Testiranje dodavanja vise zaposlednih iz Excel foldera"); Thread.Sleep(waitInMilliseconds); AddEmployeesTest.TestFillFormAutomatic(); break; } case 6: { Console.WriteLine("Testiranje podesavanja"); Thread.Sleep(waitInMilliseconds); HumanitySettingsTest.TeostGoToSettings(); break; } case 7: { Console.WriteLine("Testiranje dodavanja podataka o zaposlenom - Edite Profile Test"); Thread.Sleep(waitInMilliseconds); HumanityEditStaffTest.TestUploadPicture(); break; } case -1: { Console.WriteLine("Molimo Vas Unesite ponudjene opcije"); Thread.Sleep(waitInMilliseconds); break; } default: { Console.WriteLine("Opcija ne postoji"); break; } } } while (!izlaz); }