public override void OneTimeSetup() { _tracingBehaviorInstanceType = typeof(TracingBehavior); _tracingBehaviorInstanceFixture = this.Create <TracingBehavior>(true); _tracingBehaviorInstance = _tracingBehaviorInstanceFixture ?? this.Create <TracingBehavior>(false); CurrentInstance = _tracingBehaviorInstanceFixture; ConfigureIgnoringTests(); // Configure ignoring tests. }
public void AUT_TracingBehavior_Instantiated_Without_Parameter_No_Throw_Exception_Test() { // Arrange TracingBehavior instance = null; // Act var exception = CreateAnalyzer.GetThrownExceptionWhenCreate(out instance); // Assert instance.ShouldNotBeNull(); exception.ShouldBeNull(); }
public void AUT_TracingBehavior_Constructor_Instantiation_With_Parameter_Test() { // Arrange var writer = this.CreateType <TextWriter>(); TracingBehavior instance = null; Exception creationException = null; // Act Action createAction = () => instance = new TracingBehavior(writer); creationException = ActionAnalyzer.GetActionException(createAction); // Assert instance.ShouldNotBeNull(); _tracingBehaviorInstance.ShouldNotBeNull(); _tracingBehaviorInstanceFixture.ShouldNotBeNull(); Should.NotThrow(createAction); }