Skip to content

Commit

Permalink
Remove some dup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-martinsmith committed Aug 21, 2024
1 parent 632df46 commit c8ae5fe
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
run: dotnet build --no-restore --configuration ${{ env.BUILD_CONFIG }} /p:"Platform=${{ env.BUILD_PLATFORM }}" /p:"Version=${{ needs.setup.outputs.product_version }}" /p:"AssemblyVersion=${{ needs.setup.outputs.assembly_version }}"

- name: Test
run: dotnet test --no-restore --no-build --configuration ${{ env.BUILD_CONFIG }} --verbosity normal --logger:trx;LogFileName=TestOutput.trx --collect:"XPlat Code Coverage"
run: dotnet test --no-restore --no-build --configuration ${{ env.BUILD_CONFIG }} --verbosity normal --collect:"XPlat Code Coverage" --logger:trx;LogFileName=TestOutput.trx

- name: Test Results Summary
uses: bibipkins/[email protected]
Expand Down
6 changes: 6 additions & 0 deletions tests/DNX.Extensions.Tests/DNX.Extensions.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="TestResults\**" />
<EmbeddedResource Remove="TestResults\**" />
<None Remove="TestResults\**" />
</ItemGroup>

<ItemGroup>
<None Remove="TestData\SampleData.json" />
</ItemGroup>
Expand Down
11 changes: 8 additions & 3 deletions tests/DNX.Extensions.Tests/DateTimes/DateTimeExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,22 @@ public void SetMilliseconds_can_operate_as_expected(DateTime dateTime)

public static TheoryData<DateTime> ResetDateTime_Data()
{
return new TheoryData<DateTime>
var data = new TheoryData<DateTime>
{
{ DateTime.UtcNow },
{ DateTime.Now },
{ DateTime.UnixEpoch },
{ DateTime.Parse("2021-11-05 20:53:44.12345") },
{ DateTime.Parse("2021-11-05 20:53:44") },
{ DateTime.Parse("2021-11-05 20:53") },
{ DateTime.Parse("2021-11-05 00:00") },
{ DateTime.Parse("2021-11-05") },
};

if (DateTime.Now.Hour != DateTime.UtcNow.Hour)
{
data.Add(DateTime.Now);
}

return data;
}
}
}

0 comments on commit c8ae5fe

Please sign in to comment.