-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into depItemNetCore
- Loading branch information
Showing
23 changed files
with
518 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace MSTestAdapter.Smoke.E2ETests | ||
{ | ||
using Microsoft.MSTestV2.CLIAutomation; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
[TestClass] | ||
public class DataRowTests : CLITestBase | ||
{ | ||
private const string TestAssembly = "DataRowTestProject.dll"; | ||
|
||
[TestMethod] | ||
public void ExecuteOnlyDerivedClassDataRowsWhenBothBaseAndDerviedClassHasDataRows() | ||
{ | ||
this.InvokeVsTestForExecution(new string[] { TestAssembly }); | ||
|
||
this.ValidatePassedTestsContain( | ||
"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); | ||
} | ||
|
||
[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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace DataRowTestProject | ||
{ | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
[TestClass] | ||
public class BaseClass | ||
{ | ||
[TestMethod] | ||
[DataRow("BaseString1")] | ||
[DataRow("BaseString2")] | ||
[DataRow("BaseString3")] | ||
public virtual void DataRowTestMethod(string a) | ||
{ | ||
Assert.IsTrue(true); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
test/E2ETests/TestAssets/DataRowTestProject/DataRowTestProject.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TestFxRoot Condition="$(TestFxRoot) == ''">..\..\..\..\</TestFxRoot> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net452</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<OutputPath>$(TestFxRoot)artifacts\TestAssets\</OutputPath> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\..\src\TestFramework\Extension.Desktop\Extension.Desktop.csproj" /> | ||
<ProjectReference Include="..\..\..\..\src\TestFramework\MSTest.Core\MSTest.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.