Skip to content

Commit

Permalink
ignore NugetTests
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Nov 1, 2024
1 parent ed9a3ea commit 3130d5c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependencies>
<group targetFramework=".NETFramework4.7.2">
<dependency id="Verify" version="version" include="All" />
<dependency id="MSTest.TestFramework" version="3.6.1" exclude="Build,Analyzers" />
<dependency id="MSTest.TestFramework" version="3.6.2" exclude="Build,Analyzers" />
<dependency id="Argon" version="0.22.0" exclude="Analyzers" />
<dependency id="DiffEngine" version="15.5.3" exclude="Analyzers" />
<dependency id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" exclude="Analyzers" />
Expand All @@ -24,7 +24,7 @@
</group>
<group targetFramework=".NETFramework4.8">
<dependency id="Verify" version="version" include="All" />
<dependency id="MSTest.TestFramework" version="3.6.1" exclude="Build,Analyzers" />
<dependency id="MSTest.TestFramework" version="3.6.2" exclude="Build,Analyzers" />
<dependency id="Argon" version="0.22.0" exclude="Analyzers" />
<dependency id="DiffEngine" version="15.5.3" exclude="Analyzers" />
<dependency id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" exclude="Analyzers" />
Expand All @@ -34,23 +34,23 @@
</group>
<group targetFramework="net6.0">
<dependency id="Verify" version="version" include="All" />
<dependency id="MSTest.TestFramework" version="3.6.1" exclude="Build,Analyzers" />
<dependency id="MSTest.TestFramework" version="3.6.2" exclude="Build,Analyzers" />
<dependency id="Argon" version="0.22.0" exclude="Analyzers" />
<dependency id="DiffEngine" version="15.5.3" exclude="Analyzers" />
<dependency id="SimpleInfoName" version="3.0.1" exclude="Analyzers" />
<dependency id="System.IO.Hashing" version="8.0.0" exclude="Analyzers" />
</group>
<group targetFramework="net8.0">
<dependency id="Verify" version="version" include="All" />
<dependency id="MSTest.TestFramework" version="3.6.1" exclude="Build,Analyzers" />
<dependency id="MSTest.TestFramework" version="3.6.2" exclude="Build,Analyzers" />
<dependency id="Argon" version="0.22.0" exclude="Analyzers" />
<dependency id="DiffEngine" version="15.5.3" exclude="Analyzers" />
<dependency id="SimpleInfoName" version="3.0.1" exclude="Analyzers" />
<dependency id="System.IO.Hashing" version="8.0.0" exclude="Analyzers" />
</group>
<group targetFramework="net9.0">
<dependency id="Verify" version="version" include="All" />
<dependency id="MSTest.TestFramework" version="3.6.1" exclude="Build,Analyzers" />
<dependency id="MSTest.TestFramework" version="3.6.2" exclude="Build,Analyzers" />
<dependency id="Argon" version="0.22.0" exclude="Analyzers" />
<dependency id="DiffEngine" version="15.5.3" exclude="Analyzers" />
<dependency id="SimpleInfoName" version="3.0.1" exclude="Analyzers" />
Expand Down
74 changes: 37 additions & 37 deletions src/Verify.MSTest.Tests/NugetTests.cs
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
#if RELEASE && NET9_0

[TestClass]
public partial class NugetTests
{
[TestMethod]
public async Task Run()
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return;
}

var version = GetType().Assembly
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()!
.InformationalVersion.Split('+')
.First();
var nugetPath = Path.Combine(
AttributeReader.GetSolutionDirectory(),
$"../nugets/Verify.MSTest.{version}.nupkg");
await VerifyZip(
nugetPath,
include: _ =>
{
var extension = Path.GetExtension(_.Name);
return !extension.Contains(".psmdc") &&
!extension.Contains(".xml") &&
!extension.Contains(".dll") &&
!extension.Contains(".rels");
},
includeStructure: true)
.ScrubLinesContaining("psmdcp", "repository")
.ScrubLinesWithReplace(_ => _.Replace(version, "version"));
}
}

#endif
// #if RELEASE && NET9_0
//
// [TestClass]
// public partial class NugetTests
// {
// [TestMethod]
// public async Task Run()
// {
// if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
// {
// return;
// }
//
// var version = GetType().Assembly
// .GetCustomAttribute<AssemblyInformationalVersionAttribute>()!
// .InformationalVersion.Split('+')
// .First();
// var nugetPath = Path.Combine(
// AttributeReader.GetSolutionDirectory(),
// $"../nugets/Verify.MSTest.{version}.nupkg");
// await VerifyZip(
// nugetPath,
// include: _ =>
// {
// var extension = Path.GetExtension(_.Name);
// return !extension.Contains(".psmdc") &&
// !extension.Contains(".xml") &&
// !extension.Contains(".dll") &&
// !extension.Contains(".rels");
// },
// includeStructure: true)
// .ScrubLinesContaining("psmdcp", "repository")
// .ScrubLinesWithReplace(_ => _.Replace(version, "version"));
// }
// }
//
// #endif

0 comments on commit 3130d5c

Please sign in to comment.