-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output Ignore Message for Ignored Tests #165
Conversation
@jayaranigarg, |
{ | ||
var ignoreAttribute = GetCustomAttributes(ignoreAttributeProvider, typeof(IgnoreAttribute), true); | ||
|
||
if (ignoreAttribute == null || ignoreAttribute.Length != 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use ignoreAttribute.Any() instead.
return null; | ||
} | ||
|
||
return (ignoreAttribute[0] as IgnoreAttribute).IgnoreMessage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ignoreAttribute?.FirstOrDefault()
|
||
if (string.IsNullOrEmpty(ignoreMessage) && isIgnoreAttributeOnMethod) | ||
{ | ||
ignoreMessage = this.reflectHelper.GetIgnoreMessage(this.testMethodInfo.TestMethod); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tagging @pvlakshm to review the order - Ignore attribute on method takes precedence over class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a discussion with Pratap sir...Ignore on class takes precedence over Ignore on Method.
@@ -111,6 +116,106 @@ public void Cleanup() | |||
} | |||
|
|||
[TestMethodV1] | |||
public void IgnoreAttributeOnTestClassIgnoresTestAndPrintsClassIgnoreMessageIfProvided() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't all these method names start with ExecuteShould
instead since that is what you are acting on below?
@@ -84,6 +128,26 @@ internal UnitTestResult[] Execute() | |||
string inittestContextMessages = string.Empty; | |||
|
|||
UnitTestResult[] result = null; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a related question: How can someone leverage extensibility to achieve this test level skipping?
…ed instances. (microsoft#165) * Add missing resource. Whitespace is not a localizable resource, removed instances. * Fix VS build. * Fix unit test failure.
No description provided.