-
Notifications
You must be signed in to change notification settings - Fork 291
Base class data rows should not be executed #546
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
Changes from 1 commit
d21ba97
be0402a
1858a3c
a691dec
ef523be
7e502d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,19 +14,32 @@ public class DataRowTests : CLITestBase | |
| [TestMethod] | ||
| public void ExecuteOnlyDerivedClassDataRowsWhenBothBaseAndDerviedClassHasDataRows() | ||
| { | ||
| this.InvokeVsTestForExecution(new string[] { TestAssembly }); | ||
| this.InvokeVsTestForExecution(new string[] { TestAssembly }, testCaseFilter: "FullyQualifiedName~DerivedClass"); | ||
|
|
||
| this.ValidatePassedTestsContain( | ||
| "DataRowTestMethod (cherry)", | ||
| "DataRowTestMethod (banana)", | ||
| "DataRowTestMethod (Apple)", | ||
| "DataRowTestMethod (orange)", | ||
| "DataRowTestMethod (pineapple)"); | ||
| "DataRowTestMethod (BaseString1)", | ||
| "DataRowTestMethod (BaseString2)", | ||
| "DataRowTestMethod (BaseString3)", | ||
| "DataRowTestMethod (DerivedString1)", | ||
| "DataRowTestMethod (DerivedString2)"); | ||
|
|
||
| // 4 tests of BaseClass - 3 datarow result and 1 parent result | ||
| // 3 tests of DerivedClass - 2 datarow result and 1 parent result | ||
| // Total 7 tests - Making sure that DerivedClass doesn't run BaseClass tests | ||
| this.ValidatePassedTestsCount(7); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is little confusing.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Didn't realize the confusion. Added new test. |
||
| } | ||
|
|
||
| [TestMethod] | ||
| public void ExecuteOnlyDerivedClassDataRowsWhenItOverridesBaseClassDataRows() | ||
| { | ||
| this.InvokeVsTestForExecution(new string[] { TestAssembly }, testCaseFilter: "FullyQualifiedName~DerivedClass"); | ||
|
|
||
| this.ValidatePassedTestsContain( | ||
| "DataRowTestMethod (DerivedString1)", | ||
| "DataRowTestMethod (DerivedString2)"); | ||
|
|
||
| // 3 tests of DerivedClass - 2 datarow result and 1 parent result | ||
| this.ValidatePassedTestsCount(3); | ||
| } | ||
| } | ||
| } | ||
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 this validation change after using the filter ?
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.
By mistake added filter in first test.