public override void OneTimeSetup() { _genericMethodInstanceType = typeof(GenericMethod); _genericMethodInstanceFixture = this.Create <GenericMethod>(true); _genericMethodInstance = _genericMethodInstanceFixture ?? this.Create <GenericMethod>(false); CurrentInstance = _genericMethodInstanceFixture; ConfigureIgnoringTests(); // Configure ignoring tests. }
public void AUT_GenericMethod_Constructor_Instantiation_With_Parameter_Test() { // Arrange var method = this.CreateType <MethodInfo>(); var factory = this.CreateType <IMethodFactory>(); GenericMethod instance = null; Exception creationException = null; // Act Action createAction = () => instance = new GenericMethod(method, factory); creationException = ActionAnalyzer.GetActionException(createAction); // Assert instance.ShouldNotBeNull(); _genericMethodInstance.ShouldNotBeNull(); _genericMethodInstanceFixture.ShouldNotBeNull(); Should.NotThrow(createAction); }