Skip to content

Commit

Permalink
Updated to new Testing.Platform
Browse files Browse the repository at this point in the history
  • Loading branch information
pjoiner committed Jan 20, 2025
1 parent a1cee8f commit ac3a8c9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 4 additions & 5 deletions src/Tests/ArchiveWriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;

namespace Tests
{
Expand Down Expand Up @@ -58,7 +57,7 @@ public void ShouldBuildArchiveFromExistingFile()
[Fact]
public async Task ShouldBuildArchive()
{
var context = BuilderContext.Default;
var context = new BuilderContext(Guid.NewGuid().ToString(), true);

var occurrences = await fixture.GetOccurrencesAsync();
var occurrenceMetaDataBuilder = fixture.OccurrenceFieldsMetaDataBuilder;
Expand Down Expand Up @@ -98,7 +97,7 @@ public async Task ShouldBuildArchive()
[Fact]
public async Task ShouldBuildCoreFile()
{
var context = BuilderContext.Default;
var context = new BuilderContext(Guid.NewGuid().ToString(), true);

var occurrences = await fixture.GetOccurrencesAsync();
var occurrenceMetaDataBuilder = fixture.OccurrenceFieldsMetaDataBuilder;
Expand All @@ -121,7 +120,7 @@ public async Task ShouldBuildCoreFile()
[Fact]
public async Task ShouldBuildCoreFileWithCustomHeader()
{
var context = BuilderContext.Default;
var context = new BuilderContext(Guid.NewGuid().ToString(), true);

var occurrences = await fixture.GetOccurrencesAsync();
var occurrenceMetaDataBuilder = fixture.OccurrenceFieldsMetaDataBuilder;
Expand All @@ -146,7 +145,7 @@ public async Task ShouldBuildCoreFileWithCustomHeader()
[Fact]
public async Task FileBuilderShouldThrowOnWrongNumberOfHeaderLines()
{
var context = BuilderContext.Default;
var context = new BuilderContext(Guid.NewGuid().ToString(), true);

var occurrences = await fixture.GetOccurrencesAsync();
var occurrenceMetaDataBuilder = fixture.OccurrenceFieldsMetaDataBuilder;
Expand Down
3 changes: 2 additions & 1 deletion src/Tests/StreamReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Moq;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Xunit;

namespace Tests
Expand Down Expand Up @@ -36,7 +37,7 @@ public void ShouldReadStreamWithQuotes()
}

[Fact]
public async void ShouldReadStreamWithQuotesAsync()
public async Task ShouldReadStreamWithQuotesAsync()
{
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(data)))
{
Expand Down
8 changes: 7 additions & 1 deletion src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<PropertyGroup>
<TargetFrameworks>net9.0</TargetFrameworks>
<Configurations>Debug;Release;LocalRelease</Configurations>
<IsTestProject>true</IsTestProject>
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand All @@ -17,7 +19,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="ReportGenerator" Version="5.4.3" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.v3" Version="1.0.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down Expand Up @@ -73,4 +75,8 @@
</None>
</ItemGroup>

<ItemGroup>
<Using Include="Xunit"/>
</ItemGroup>

</Project>

0 comments on commit ac3a8c9

Please sign in to comment.