Exemplo n.º 1
0
        public void NotEmptyCarType_ShouldReturnTrue()
        {
            var    newWindow = new AddNewWindow();
            string carType   = "Tóth János";
            var    result    = newWindow.ValidateCarType(carType);

            Assert.IsTrue(result);
        }
Exemplo n.º 2
0
        public void NotEmptyClientName_ShouldReturnTrue()
        {
            var    newWindow  = new AddNewWindow();
            string clientName = "Tóth János";
            var    result     = newWindow.ValidateClientName(clientName);

            Assert.IsTrue(result);
        }
Exemplo n.º 3
0
        public void EmptyCarType_ShouldReturnFalse()
        {
            var    newWindow    = new AddNewWindow();
            string emtpyCarType = "";
            var    result       = newWindow.ValidateCarType(emtpyCarType);

            Assert.IsFalse(result);
        }
Exemplo n.º 4
0
        public void AcceptableLicensePlate_ShouldReturnTrue()
        {
            var    newWindow        = new AddNewWindow();
            string goodLicensePlate = "KLI-592";
            var    result           = newWindow.ValidateLicensePlate(goodLicensePlate);

            Assert.IsTrue(result);
        }
Exemplo n.º 5
0
        public void NotAcceptableLicensePlate_ShouldReturnFalse()
        {
            var    newWindow         = new AddNewWindow();
            string wrongLicensePlate = "BG-123";
            var    result            = newWindow.ValidateLicensePlate(wrongLicensePlate);

            Assert.IsFalse(result);
        }
Exemplo n.º 6
0
 private void EditSelectedReservation()
 {
     if (currentlySelectedReservation != null)
     {
         AddNewWindow addNewWindow = new AddNewWindow(dataConnection, currentlySelectedReservation);
         addNewWindow.Show();
     }
 }
Exemplo n.º 7
0
 private void addnewproject_Click(object sender, RoutedEventArgs e)
 {
     addnewwindow = new AddNewWindow();
     addnewwindow.ShowDialog();
     if (addnewwindow.ReturnNumbers() != 0)
     {
         view = new RectanglesAndInputs(addnewwindow.ReturnNumbers());
         view.Show_All();
         this.currentfilename = addnewwindow.ReturnPath();
         this.tname.Text      = addnewwindow.ReturnName();
         this.tnumbers.Text   = addnewwindow.ReturnNumbers().ToString();
     }
 }
Exemplo n.º 8
0
        public void ShowAddNewWindow()
        {
            AddNewWindow showAddNewWindow = new AddNewWindow();

            showAddNewWindow.Show();
        }
Exemplo n.º 9
0
 private void MenuItem_Add(object sender, RoutedEventArgs e)
 {
     AddNewWindow addNewWindow = new AddNewWindow(dataConnection);
     addNewWindow.Show();
 }