Skip to content

Base class data rows should not be executed#546

Merged
jayaranigarg merged 6 commits into
microsoft:masterfrom
jayaranigarg:issue458
Jan 11, 2019
Merged

Base class data rows should not be executed#546
jayaranigarg merged 6 commits into
microsoft:masterfrom
jayaranigarg:issue458

Conversation

@jayaranigarg

@jayaranigarg jayaranigarg commented Dec 19, 2018

Copy link
Copy Markdown
Member

#458

Need to add tests.

else
{
UTF.ITestDataSource[] testDataSources = this.testMethodInfo.GetAttributes<Attribute>(true)?.Where(a => a is UTF.ITestDataSource).OfType<UTF.ITestDataSource>().ToArray();
UTF.ITestDataSource[] testDataSources = this.testMethodInfo.GetAttributes<Attribute>(false)?.Where(a => a is UTF.ITestDataSource).OfType<UTF.ITestDataSource>().ToArray();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@jayaranigarg jayaranigarg requested a review from abhishkk January 10, 2019 06:12
// 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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is little confusing.
We should rather run only the DerviedClass tests using filter maybe and then check for only that.
We can keep this one as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't realize the confusion. Added new test.

{
this.InvokeVsTestForExecution(new string[] { TestAssembly }, testCaseFilter: "FullyQualifiedName~DerivedClass");

this.ValidatePassedTestsContain(

Copy link
Copy Markdown
Contributor

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 ?

Copy link
Copy Markdown
Member Author

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.

@jayaranigarg jayaranigarg merged commit ea644c1 into microsoft:master Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants