private void fillBrakingParametersExpectations(TestCase aTestCase, int stepNumber, string name,
            string expression, List<double> distanceValues, List<double> speedValues, List<double> values)
        {
            Step aStep = new Step();
            aStep.Name = String.Format("Step{0} - {1}", stepNumber, name);
            aTestCase.AddModelElement(aStep);

            SubStep aSubStep = new SubStep();
            aSubStep.Name = String.Format("SubStep1 - Verify {0} values", name);
            aStep.AddModelElement(aSubStep);

            for (int i = 0; i < values.Count; i++)
            {
                if (values[i] != -1)
                {
                    Expectation expectation = new Expectation();
                    expectation.ExpressionText = String.Format(CultureInfo.InvariantCulture, expression,
                        Math.Round(distanceValues[i], 2), Math.Round(speedValues[i], 2), Math.Round(values[i], 4));
                    aSubStep.AddModelElement(expectation);
                }
            }
        }
 private void addAction(SubStep aSubStep, string expression)
 {
     TestAction anAction = new TestAction();
     anAction.ExpressionText = expression;
     aSubStep.AddModelElement(anAction);
 }
 private void addExpectation(SubStep aSubStep, string expression)
 {
     Expectation anExpectation = new Expectation();
     anExpectation.ExpressionText = expression;
     anExpectation.Blocking = true;
     aSubStep.AddModelElement(anExpectation);
 }
        private void intializeEFS(TestCase aTestCase, Workbook workbook)
        {
            Step aStep = new Step();
            aStep.Name = "Step1 - Setup";
            aTestCase.AddModelElement(aStep);

            SubStep aSubStep = new SubStep();
            aSubStep.Name = "SubStep1 - Setup";
            aSubStep.setSkipEngine(true);
            aStep.AddModelElement(aSubStep);

            TestAction powerOn = new TestAction();
            powerOn.ExpressionText = "Kernel.PowerOn <- True";
            aSubStep.AddModelElement(powerOn);

            TestAction modeInitialization = new TestAction();
            modeInitialization.ExpressionText = "Kernel.Mode <- Mode.FS";
            aSubStep.AddModelElement(modeInitialization);

            TestAction levelInitialization = new TestAction();
            levelInitialization.ExpressionText =
                "Kernel.Level <- Kernel.LevelData\n{\n    Value => LevelDataStruct { Value => Level.L1 },\n    DataState => DataState.Valid\n}";
            aSubStep.AddModelElement(levelInitialization);

            TestAction odometryInitialization = new TestAction();
            odometryInitialization.ExpressionText = "Odometry.NominalDistance <- 0.0";
            aSubStep.AddModelElement(odometryInitialization);

            TestAction LRBGInitialization = new TestAction();
            LRBGInitialization.ExpressionText = "BTM.LRBG <- BTM.BaliseGroupStruct{\n" +
                                                "    NID => 0,\n" +
                                                "    Orientation => Default.Orientation.Nominal,\n" +
                                                "    Position => BTM.Position{\n" +
                                                "        Position => 0.0,\n" +
                                                "        UnderReadingAmountOdo => 0.0,\n" +
                                                "        OverReadingAmountOdo => 0.0\n" +
                                                "    },\n" +
                                                "    Timestamp => Default.DateAndTime{\n" +
                                                "        Year => 2012,\n" +
                                                "        Month => 12,\n" +
                                                "        Day => 20,\n" +
                                                "        Hour => 20,\n" +
                                                "        Minute => 12,\n" +
                                                "        Second => 20,\n" +
                                                "        TTS => 600\n" +
                                                "    }\n" +
                                                "}";
            aSubStep.AddModelElement(LRBGInitialization);
        }