public void TestSuiteContext_CurrentTestContext() { TestSuiteContext.Create(); var tsc = TestSuiteContext.Instance; const string tcName = "Name"; var mi = GetType().GetMethod("TestSuiteContext_CurrentTestContext"); var parameters = new[] { "para,etsr" }; var tc = new Titan.Framework.Testing.TestContext(mi, parameters, null, tsc); tsc.CurrentTestContext().ShouldBe(tc); }
public void TestContext_CreateInstance() { TestSuiteContext.Create(); var tsc = TestSuiteContext.Instance; var tags = new [] { "a", "b", "c" }; var parameters = new[] { "parameters" }; var mi = GetType().GetMethod("TestContext_CreateInstance"); var tc = new Titan.Framework.Testing.TestContext(mi, parameters, tags, tsc); tc.Name.ShouldBe(mi.Name); tc.Parameters.ShouldBe(parameters); tc.Tags.ShouldBe(tags); tc.CreatedOnUtc.ShouldNotBe(default(DateTime)); tc.TestSuiteContext.ShouldBe(tsc); tc.ExecutionId.IsNullOrEmpty().ShouldBeFalse(); tsc.TestContexts.Last().ShouldBe(tc); }
public void TestContextStep_Create() { if (TestSuiteContext.Instance == null) { TestSuiteContext.Create(); } var parameters = new[] { "invocationParams" }; var mi = GetType().GetMethod("TestContextStep_Create"); var tc = new TestContext(mi, parameters, null, TestSuiteContext.Instance); var tcs = new TestContextStep(tc, mi, parameters); tcs.Name.ShouldBe(mi.Name); tcs.Parameters.ShouldBe(parameters); tcs.TestContext.ShouldBe(tc); tcs.ExecutionId.IsNullOrEmpty().ShouldBeFalse(); tcs.CreatedOnUtc.ShouldNotBe(default(DateTime)); }