Skip to content

Nunit.Framework.Internal.Test's Fixture property is null from inside ITestBuilder #4372

Discussion options

You must be logged in to vote

@amine-aboufirass The suite passed in to the BuildFrom method is the Fixture you are in and the property ClassName is its type. Note that you cannot call a non-static method as at the time the ITestBuilder is run, it is to create tests, not to run them and the class will not be instantiated.

I'm still confused what you are trying to do and why you cannot call your PrintHello from the [SetUp] method.

@stevenaw Indeed the derived ICommandWrapper allows you to wrap tests, but the needed class TestCommand is in the Internal namespace so I don't know if that is really meant to be used by outside code?

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by OsirisTerje
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants
Converted from issue

This discussion was converted from issue #4370 on April 28, 2023 18:54.