Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 committed Nov 21, 2024
1 parent 2b11863 commit 9006f21
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
4 changes: 2 additions & 2 deletions TestFx.sln
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Testing.Platform.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Testing.Extensions.MSBuild", "src\Platform\Microsoft.Testing.Extensions.MSBuild\Microsoft.Testing.Extensions.MSBuild.csproj", "{8CE782A2-7374-4916-9C69-1F87E51A64A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFramework.Extensions.Csv", "src\TestFramework\TestFramework.Extensions.Csv\TestFramework.Extensions.Csv.csproj", "{536A4485-F77F-4617-8449-2DCB387514AB}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSTest.DataSource.Csv", "src\TestFramework\TestFramework.Extensions.Csv\MSTest.DataSource.Csv.csproj", "{536A4485-F77F-4617-8449-2DCB387514AB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestFramework.Extensions.Xml", "src\TestFramework\TestFramework.Extensions.Xml\TestFramework.Extensions.Xml.csproj", "{7BF7BE9E-8D46-47ED-B45D-121C2252DF16}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSTest.DataSource.Xml", "src\TestFramework\TestFramework.Extensions.Xml\MSTest.DataSource.Xml.csproj", "{7BF7BE9E-8D46-47ED-B45D-121C2252DF16}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions eng/verify-nupkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ function Confirm-NugetPackages {
"MSTest.Sdk" = 15;
"MSTest.Internal.TestFx.Documentation" = 10;
"MSTest.TestFramework" = 130;
"MSTest.TestFramework.Csv" = 7;
"MSTest.TestFramework.Xml" = 7;
"MSTest.DataSource.Csv" = 7;
"MSTest.DataSource.Xml" = 7;
"MSTest.TestAdapter" = 76;
"MSTest" = 6;
"MSTest.Analyzers" = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
using System.Globalization;
using System.Reflection;

using Microsoft.VisualStudio.TestTools.UnitTesting.Internal;

namespace Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
/// Attribute to define dynamic data from a CSV file for a test method.
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false/*TODO: Do we want to allow multiple*/)]
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class CsvDataSourceAttribute : Attribute, ITestDataSource
{
// Template used to map from a filename to a DB connection string
Expand Down Expand Up @@ -82,6 +84,5 @@ public CsvDataSourceAttribute(string fileName)
}

string? ITestDataSource.GetDisplayName(MethodInfo methodInfo, object?[]? data)
// TODO
=> null;
=> TestDataSourceUtilities.ComputeDefaultDisplayName(methodInfo, data, DynamicDataAttribute.TestIdGenerationStrategy);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>MSTest.TestFramework.Csv</PackageId>
<PackageId>MSTest.DataSource.Csv</PackageId>
<PackageTags>MSTest TestFramework Unittest MSTestV2 Microsoft Test Testing TDD Framework</PackageTags>
<PackageDescription>
MSTest is Microsoft supported Test Framework.
Expand All @@ -22,16 +22,12 @@

<PropertyGroup>
<RootNamespace>Microsoft.VisualStudio.TestTools.UnitTesting</RootNamespace>
<!-- TODO: Discuss the assembly name before shipping/merging -->
<AssemblyName>Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.Csv</AssemblyName>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="$(RepoRoot)src\TestFramework\TestFramework.Extensions\TestFramework.Extensions.csproj" />

<!--<PackageReference Include="System.Data.Odbc" />-->
<PackageReference Include="System.Data.OleDb" />
<!--<PackageReference Include="Microsoft.Data.SqlClient" />-->
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<IsPackable>true</IsPackable>
<PackageId>MSTest.TestFramework.Xml</PackageId>
<PackageId>MSTest.DataSource.Xml</PackageId>
<PackageTags>MSTest TestFramework Unittest MSTestV2 Microsoft Test Testing TDD Framework</PackageTags>
<PackageDescription>
MSTest is Microsoft supported Test Framework.
Expand All @@ -22,8 +22,6 @@

<PropertyGroup>
<RootNamespace>Microsoft.VisualStudio.TestTools.UnitTesting</RootNamespace>
<!-- TODO: Discuss the assembly name before shipping/merging -->
<AssemblyName>Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.Xml</AssemblyName>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
using System.Reflection;
using System.Xml;

using Microsoft.VisualStudio.TestTools.UnitTesting.Internal;

namespace Microsoft.VisualStudio.TestTools.UnitTesting;

/// <summary>
/// Attribute to define dynamic data from an XML file for a test method.
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false/*TODO: Do we want to allow multiple*/)]
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class XmlDataSourceAttribute : Attribute, ITestDataSource
{
public XmlDataSourceAttribute(string fileName, string tableName)
Expand Down Expand Up @@ -53,6 +55,5 @@ public XmlDataSourceAttribute(string fileName, string tableName)
}

string? ITestDataSource.GetDisplayName(MethodInfo methodInfo, object?[]? data)
// TODO
=> null;
=> TestDataSourceUtilities.ComputeDefaultDisplayName(methodInfo, data, DynamicDataAttribute.TestIdGenerationStrategy);
}
2 changes: 2 additions & 0 deletions src/TestFramework/TestFramework/TestFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

<ItemGroup>
<InternalsVisibleTo Include="MSTest.TestAdapter" Key="$(VsPublicKey)" />
<InternalsVisibleTo Include="MSTest.DataSource.Csv" Key="$(VsPublicKey)" />
<InternalsVisibleTo Include="MSTest.DataSource.Xml" Key="$(VsPublicKey)" />
<InternalsVisibleTo Include="Microsoft.VisualStudio.TestPlatform.MSTestAdapter.UnitTests" Key="$(VsPublicKey)" />
</ItemGroup>

Expand Down

0 comments on commit 9006f21

Please sign in to comment.