コード例 #1
0
        public static bool Run(int expectedMaximumNumberOfEvents)
        {
            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.RunSelectTab.Run(0);

            isPassed &= AssertFunctions.LessOrEqual(expectedMaximumNumberOfEvents, Execution.Table.GetNumberOfEvents(), "Checking whether the number of events is less than or equal to: " + expectedMaximumNumberOfEvents);

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

            TearDown();
            return(isPassed);
        }