public void Next()
        {
            String input = inputTextBox.Text;
            String input2 = input2TextBox.Text;

            int checkWordsReturnValue = RegenerationAutomatonWojComputations.ValidateInput(input, input2, percentTextBox.Text);

            switch (checkWordsReturnValue)
            {
                case Constants.EVERYTING_OK:

                    //procent błedu ktory akceptujemy
                    double chance = double.Parse(percentTextBox.Text) / 100;
                    bool isError = treatAsError.IsChecked.Value;

                    //-------------------
                    PercentageRegenerationAutomaton percentageRegenerationAutomaton = new PercentageRegenerationAutomaton();

                    int inputLength = 0;
                    string finalInput = RegenerationAutomatonWojComputations.PrepareInput(input, input2, ref inputLength);

                    bool accepted = percentageRegenerationAutomaton.ComputeAnswer(finalInput, chance, int.Parse(maxNumOfErrors.Text), isError);

                    ShowSolution(accepted);
                    break;

                default:
                    RegenerationAutomatonWojComputations.DetermineError(checkWordsReturnValue);
                    break;
            }
        }
        public void ComputeAnswerUnitTest()
        {
            string finalInput = "111111010101";
            double p = 0.5;
            int errRej = 2;
            bool isXSim = false;
            PercentageRegenerationAutomaton method = new PercentageRegenerationAutomaton();
            bool answer = method.ComputeAnswer(finalInput, p, errRej, isXSim);

            string finalInput2 = "11111011111111101110";
            double p2 = 0.2;
            bool answer2 = method.ComputeAnswer(finalInput2, p2, errRej, isXSim);

            Assert.AreEqual(false,answer);
            Assert.AreEqual(true, answer2);
        }