예제 #1
0
        public static bool Run(string accuracy, string expectedCoefficients)
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            bool isPassed = Execution.Container.SelectTabCoefficientsOverview();

            isPassed &= Execution.CoefficientsOverview.AreCalculatedCoefficientsAvailable();
            isPassed &= Execution.CoefficientsOverview.CompareCoefficients(accuracy, StringToStringArrayConverter.Run(expectedCoefficients));

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CompareCalculatedCoefficientsWithExpectedCoefficients passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CompareCalculatedCoefficientsWithExpectedCoefficients failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
예제 #2
0
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */
            string expectedCoefficients = "";
            string tableValues          = "";
            //Referenzwerte kommen von Jochen oder Manuel von PC-F

            bool isPassed = Execution.Container.SelectTabBaseSettings();

            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Fine tuning settings", string.Empty, string.Empty, string.Empty, string.Empty);
            isPassed &= Execution.Container.SelectTabLiquidProperties();
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid properties tab is active.");
            isPassed &= Execution.SetTableValues.SetValues(StringToListConverter.Run(tableValues));
            isPassed &= AssertFunctions.AreEqual(true, DeviceFunctionLoader.CoDIA.ConcentrationV2.Functions.MenuArea.Toolbar.Validation.IsCalculationButtonEnabled.Run(), "Verifies that calculate button is enabled.");
            isPassed &= Execution.CoefficientsOverview.CompareCoefficients("0.01", StringToStringArrayConverter.Run(expectedCoefficients));

            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_EnterDataForFineTuning passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_EnterDataForFineTuning failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
        public static bool Run()
        {
            StartUp();

            /* Add your TestFramework calls here, for example:
             * EH.PCPS.TestAutomation.CommonHostApplicationLayerLoader.CommonFlows.OpenHostApplication.Run(pathToApplication);
             * EH.PCPS.TestAutomation.DeviceFunctionLoader.CoDIA.Parameterization.Flows.OpenModuleOnline.Run();
             */

            // Dummy-Values um Änderungen in der Berechnung festzustellen
            string expectedCoefficients = "-0.0533;-1.3581;3.4876;-2.0645;0.3985;0.0000;0.0000;0.0000;0.0000;0.0000;0.0000;0.0000";
            string tableValues          = "5;-10;0.5;10;0;0.6;15;10;0.7;20;20;0.8;25;30;0.9;30;40;1;35;50;1.1;40;60;1.2;45;70;1.3;50;75;1.4;55;80;1.5;60;85;1.6;65;90;1.7;70;95;1.8";

            // TODO:
            // Referenzwerte kommen von Jochen oder Manuel von PC-F
            bool isPassed = true; // = Execution.Container.SelectTabBaseSettings();

            isPassed &= Flows.ConfigureBaseSettings.BaseConfiguration("Liquid properties", string.Empty, string.Empty, string.Empty, string.Empty);
            isPassed &= AssertFunctions.AreEqual(true, Validation.CheckAvailabilityOfTabPages.IsLiquidPropertiesTabPageAvailable(), "Verify that Liquid properties tab is active.");
            isPassed &= Execution.Container.SelectTabLiquidProperties();
            Execution.LiquidProperties.InputFormat = "List";
            Execution.TakeScreenshotOfModule.Run();
            isPassed &= Execution.SetTableValues.SetValues(StringToListConverter.Run(tableValues));
            isPassed &= Execution.LiquidProperties.Recalculate();
            isPassed &= Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= Execution.CoefficientsOverview.CompareCoefficients("0.01", StringToStringArrayConverter.Run(expectedCoefficients));
            isPassed &= Execution.Container.SelectTabLiquidProperties();

            Log.Info(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Please have a look at the screenshot to verify Concentration Table Validity");
            if (isPassed)
            {
                Log.Success(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CalculateCoefficients passed.");
            }
            else
            {
                Log.Failure(LogInfo.Namespace(MethodBase.GetCurrentMethod()), "Test case TC_CalculateCoefficients failed.");
                Log.Screenshot();
            }

            TearDown();
            return(isPassed);
        }
예제 #4
0
        /// <summary>
        /// The execute shared functions.
        /// </summary>
        /// <param name="comparingAccuracy">
        /// The comparing accuracy.
        /// </param>
        /// <param name="expectedCoefficients">
        /// The expected coefficients.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        private static bool ExecuteSharedFunctions(string comparingAccuracy, string expectedCoefficients)
        {
            bool isPassed;

            isPassed  = Execution.Container.SelectTabCoefficientsOverview();
            isPassed &= AssertFunctions.AreEqual(true, Execution.CoefficientsOverview.AreCalculatedCoefficientsAvailable(), AssertMessage);
            isPassed &= AssertFunctions.AreEqual(true, Execution.CoefficientsOverview.CompareCoefficients(comparingAccuracy, StringToStringArrayConverter.Run(expectedCoefficients)), "Verify that coefficients have been loaded correctly.");
            isPassed &= Execution.Container.SelectTabExpertResults();
            Execution.TakeScreenshotOfModule.Run();
            return(isPassed);
        }
        public void StringToStringArrayConverterForIrregularValues()
        {
            var result = StringToStringArrayConverter.Convert(" ,prajjwal,ayushpant1, yoyoman,r$3221,%343sdas, ");

            CollectionAssert.AreEqual(new[] { "prajjwal", "ayushpant1", "yoyoman", "r$3221", "%343sdas" }, result);
        }
예제 #6
0
 public async Task ReplaceLabelsForIssue(long repositoryId, int issueNumber, string labels, GitHubClient authorizedGitHubClient)
 {
     await _issueRepository.ReplaceLabelsForIssue(repositoryId, issueNumber,
                                                  StringToStringArrayConverter.Convert(labels), authorizedGitHubClient);
 }
예제 #7
0
 public async Task <Issue> RemoveAssigneesFromIssue(string owner, string name, int number, string assignees,
                                                    GitHubClient authorizedGitHubClient)
 {
     return(await _issueRepository.RemoveAssigneesFromIssue(owner, name, number, new AssigneesUpdate(StringToStringArrayConverter.Convert(assignees)),
                                                            authorizedGitHubClient));
 }