public override void OneTimeSetup() { _staticMethodInstanceType = typeof(StaticMethod); _staticMethodInstanceFixture = this.Create <StaticMethod>(true); _staticMethodInstance = _staticMethodInstanceFixture ?? this.Create <StaticMethod>(false); CurrentInstance = _staticMethodInstanceFixture; ConfigureIgnoringTests(); // Configure ignoring tests. }
public void AUT_StaticMethod_Constructor_Instantiation_With_Parameter_Test() { // Arrange var methodInfo = this.CreateType <MethodInfo>(); StaticMethod instance = null; Exception creationException = null; // Act Action createAction = () => instance = new StaticMethod(methodInfo); creationException = ActionAnalyzer.GetActionException(createAction); // Assert instance.ShouldNotBeNull(); _staticMethodInstance.ShouldNotBeNull(); _staticMethodInstanceFixture.ShouldNotBeNull(); Should.NotThrow(createAction); }