Skip to content

Commit

Permalink
Fixed test build
Browse files Browse the repository at this point in the history
  • Loading branch information
imperugo committed Dec 23, 2023
1 parent 2197d44 commit e08c012
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ jobs:
env:
REDIS_HOST: localhost

- name: Run netcoreapp2.1 Tests
run: dotnet test -f netcoreapp2.1 --verbosity quiet
shell: bash
env:
REDIS_HOST: localhost

publish:
needs: runner-job
name: Publish Nuget Packages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ public async Task Add_Value_Type_To_Redis_Database_Async()
[Fact]
public async Task Add_Complex_Item_To_Redis_Database_Async()
{
var testobject = new TestClass<DateTime>();
var testClass = new TestClass<DateTime>();

var added = await Sut
.GetDefaultDatabase()
.AddAsync("my Key", testobject)
.AddAsync("my Key", testClass)
;

var redisValue = await db.StringGetAsync("my Key");
Expand All @@ -168,8 +168,8 @@ public async Task Add_Complex_Item_To_Redis_Database_Async()

Assert.True(db.KeyExists("my Key"));
Assert.NotNull(obj);
Assert.Equal(testobject.Key, obj.Key);
Assert.Equal(testobject.Value.ToUniversalTime(), obj.Value.ToUniversalTime());
Assert.Equal(testClass.Key, obj.Key);
Assert.Equal(testClass.Value.ToUniversalTime(), obj.Value.ToUniversalTime());
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;;net8.0</TargetFrameworks>
<TargetFrameworks Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' ">net6.0;net7.0;net8.0;</TargetFrameworks>
<TargetFrameworks Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' ">net6.0;net7.0;net8.0;</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0'">
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>

<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.categories" Version="2.0.8" />
<PackageReference Include="Moq" Version="4.18.4" />
Expand Down

0 comments on commit e08c012

Please sign in to comment.