public void validateProcessor()
        {
            Processor processor = new Processor();
            ProcessorValidator validator = new ProcessorValidator();

            processor.Description = "Dies ist ein Test";
            processor.Model = "i5";
            processor.Core = 6;
            processor.CommandSet = "RISCC!";
            processor.Architecture = 64;
            processor.ClockRate = 3.40;

            Assert.AreEqual(false, validator.CheckConsistency(processor));
        }
        /// <summary>
        /// Ruft die Informationen aus dem Formular ab und speichert sie in die Datenbank.
        /// Wirft eine Fehlermeldung, wenn die Validierung fehlschlägt.
        /// </summary>
        private void ProcessorSave_Click(object sender, RoutedEventArgs e)
        {
            ProducerDataAccess dataProducer = new ProducerDataAccess();
            ProcessorDataAccess processorDataAccess = new ProcessorDataAccess();
            ProcessorValidator validator = new ProcessorValidator();

            try
            {
                this.setEntityWithFormData(dataProducer);

                if (!validator.CheckConsistency(this.entity))
                {
                    ErrorHandler.ShowErrorMessage("Validierung fehlgeschlagen", ErrorHandler.VALIDATION_FAILED);
                }
                else
                {
                    if (this.isAvailable)
                        processorDataAccess.Update(this.entity);
                    else
                        processorDataAccess.Save(this.entity);
                    this.Close();
                }
            }
            catch (FormatException exception)
            {
                ErrorHandler.ShowErrorMessage(exception, ErrorHandler.WRONG_FORMAT);
            }
            catch (MySql.Data.MySqlClient.MySqlException exception)
            {
                ErrorHandler.ShowErrorMessage(exception, ErrorHandler.SAVE_WENT_WRONG);
            }
            catch(System.OverflowException exception)
            {
                ErrorHandler.ShowErrorMessage(exception, ErrorHandler.DATA_TOO_LONG);
            }
        }