You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the context of an attribute implementing ITestAction applied at assembly level, I'm receiving NullReferenceException when calling TestContext.CurrentContext.TestDirectory in AfterTest method.
Use of TypeInfo implies that the test is implemented by a method or class. That's true for everything except the top-level assembly. We can either add special code to detect that it's a test assembly and cast in order to get the Assembly or - even simpler - arrange to fall through to the following code that uses GetCallingAssembly.
Hello !
In the context of an attribute implementing ITestAction applied at assembly level, I'm receiving NullReferenceException when calling TestContext.CurrentContext.TestDirectory in AfterTest method.
I've provided a project as a sample.
ClassLibrary22.zip
As work around, I'm doing:
AssemblyHelper.GetDirectoryName(Assembly.GetCallingAssembly())
Is there another way to get the test directory at this moment ?
Regards,
Florian
The text was updated successfully, but these errors were encountered: