StoryTeller.Execution.ProjectTestRunner.RunAndAssertTest C# (CSharp) Méthode

RunAndAssertTest() public méthode

public RunAndAssertTest ( string testPath ) : void
testPath string
Résultat void
        public void RunAndAssertTest(string testPath)
        {
            var test = RunTest(testPath);

            bool shouldOpen = shouldOpenTest(test.LastResult);
            if (shouldOpen)
            {
                test.OpenResultsInBrowser();
            }

            if (!test.WasSuccessful())
            {
                throw new StorytellerAssertionException(test.GetStatus());
            }
        }

Usage Example

 public void Simple_local_subscription()
 {
     var project =
         new ProjectDirectoryLoader(new FileSystem()).Load(".".ToFullPath().ParentDirectory().ParentDirectory());
     using (var runner = new ProjectTestRunner(project))
     {
         runner.RunAndAssertTest("Subscriptions/Simple local subscription");
     }
 }
All Usage Examples Of StoryTeller.Execution.ProjectTestRunner::RunAndAssertTest