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
This logic is incorrect. testMethodInfo.TestMethod.DeclaringType isn't necessarily the same as testMethodInfo.Parent.ClassType.
The correct one should be testMethodInfo.Parent.ClassType.
This affects the case where there a TestMethod is declared in abstract class, and the derived test class has TestProperty attribute. In that case, the property doesn't correctly flow to TestContext.Properties. In this case, the DeclaringType is the abstract class, while the ClassType is really the concrete test class.
The text was updated successfully, but these errors were encountered:
testfx/src/Adapter/MSTest.TestAdapter/Execution/TypeCache.cs
Line 791 in eba5fbb
This logic is incorrect.
testMethodInfo.TestMethod.DeclaringType
isn't necessarily the same astestMethodInfo.Parent.ClassType
.The correct one should be
testMethodInfo.Parent.ClassType
.This affects the case where there a
TestMethod
is declared in abstract class, and the derived test class hasTestProperty
attribute. In that case, the property doesn't correctly flow toTestContext.Properties
. In this case, the DeclaringType is the abstract class, while the ClassType is really the concrete test class.The text was updated successfully, but these errors were encountered: