Example #1
0
        protected void AssertSucceeded(Configuration configuration, Action <PSharpRuntime> test)
        {
            TestOutputLogger logger = new TestOutputLogger(this.TestOutput);

            try
            {
                var engine = BugFindingEngine.Create(configuration, test);
                engine.SetLogger(logger);
                engine.Run();

                var numErrors = engine.TestReport.NumOfFoundBugs;
                Assert.True(numErrors == 0, GetBugReport(engine));
            }
            catch (Exception ex)
            {
                Assert.False(true, ex.Message + "\n" + ex.StackTrace);
            }
            finally
            {
                logger.Dispose();
            }
        }