Beispiel #1
0
 public static void Create()
 {
     if (Instance != null)
     {
         throw new InvalidOperationException("TestSuiteContext can be created only once.");
     }
     Instance = new TestSuiteContext(Guid.NewGuid().ToString());
 }
Beispiel #2
0
 public TestContext(MethodInfo methodInfo, IEnumerable <object> parameters, IEnumerable <string> tags, TestSuiteContext testSuiteContext)
 {
     MethodInfo       = methodInfo;
     Parameters       = parameters;
     Name             = methodInfo.Name;
     TestSuiteContext = testSuiteContext;
     ExecutionId      = Guid.NewGuid().ToString();
     CreatedOnUtc     = DateTime.UtcNow;
     Tags             = tags;
     testSuiteContext.TestContexts.Add(this);
 }
Beispiel #3
0
 public static TestContext CurrentTestContext(this TestSuiteContext tsc)
 {
     return(tsc.TestContexts.LastOrDefault());
 }