public override void TestFinished(Description description) { if (TestFailed) { ReportAdditionalFailureInfo(StripTestNameAugmentations(description.MethodName)); } Scope = LifecycleScope.SUITE; TestFailed = false; }
public override void TestRunStarted(Description description) { SuiteFailed = false; TestFailed = false; Scope = LifecycleScope.SUITE; Type targetClass = RandomizedContext.current().TargetClass; TestClassesRun.Add(targetClass.Name); }
public void Register <I, T>(Func <T> factory, LifecycleScope scope) where I : class where T : class { if (factory == null) { throw new ArgumentNullException("factory"); } var type = typeof(I); if (IsRegistered(type)) { throw new InvalidOperationException($"{type} object type is already registered."); } _factoryTable[type] = new IocEntry(factory, scope); }
public override void TestStarted(Description description) { this.TestFailed = false; this.Scope = LifecycleScope.TEST; }
// Initialize a new instance of IocEntry class // factory: the factory public IocEntry(object factory, LifecycleScope scope = LifecycleScope.Singleton) { Scope = scope; _stack = new Stack <object>(); _stack.Push(factory); }
public void Register <I, T>(T value, LifecycleScope scope) where I : class where T : class => this.Register <I, T>(() => value, scope);