concord.Builders.TestRunBuilders.CategoryRunner.Execute C# (CSharp) 메소드

Execute() 공개 메소드

public Execute ( ) : int
리턴 int
        public int Execute()
        {
            try
            {
                var result = RunTesterBlocking();
                var summary = new ResultSummarizer(result);

                return summary.Errors + summary.Failures + summary.NotRunnable;
            }
            catch (FileNotFoundException ex)
            {
                Console.WriteLine(ex.Message);
                return ConsoleUi.FILE_NOT_FOUND;
            }
            catch (Exception ex)
            {
                //TODO need to expand on error cases better... mimic console runner
                Console.WriteLine(ex);
                return ConsoleUi.UNEXPECTED_ERROR;
            }
        }

Usage Example

예제 #1
0
 public TestRunAction BuildTestRunAction(string name, int index, string testFixture)
 {
     var runner = new CategoryRunner(_assemblyLocation, GetNameFilter(testFixture), BuildOutputXmlPath("fixture-" + testFixture));
     return new TestRunAction
     {
         Name = name,
         Index = index,
         RunTests = () => runner.Execute()
     };
 }
All Usage Examples Of concord.Builders.TestRunBuilders.CategoryRunner::Execute