Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net8 #87

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Net8 #87

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samples/BlazorServer/BlazorServer.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions samples/BlazorWebAssembly/BlazorWebAssembly.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions samples/bUnitExample/bUnitExample.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="bunit.web" Version="1.12.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="bunit.web" Version="1.31.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<Authors>Chris Sainty</Authors>
<Company></Company>
Expand Down Expand Up @@ -35,7 +35,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="bunit.core" Version="1.13.5" />
<PackageReference Include="bunit.core" Version="1.31.3" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 5 additions & 1 deletion src/Blazored.SessionStorage/Blazored.SessionStorage.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>

<Authors>Chris Sainty</Authors>
<Company></Company>
Expand Down Expand Up @@ -37,6 +37,10 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="$(DotNet7Version)" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="$(DotNet8Version)" />
</ItemGroup>

<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="\" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>

Expand All @@ -11,16 +11,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.0" />
<PackageReference Include="Moq" Version="4.18.3" />
<PackageReference Include="System.Text.Json" Version="7.0.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public GetItemAsStringAsync()
[InlineData("")]
[InlineData(" ")]
[InlineData(null)]
public void ThrowsArgumentNullException_When_KeyIsInvalid(string key)
public async Task ThrowsArgumentNullException_When_KeyIsInvalid(string key)
{
// arrange / act
var action = new Func<Task>(async () => await _sut.GetItemAsStringAsync(key));

// assert
Assert.ThrowsAsync<ArgumentNullException>(action);
await Assert.ThrowsAsync<ArgumentNullException>(action);
}

[Theory]
Expand Down Expand Up @@ -75,4 +75,4 @@ public async Task ReturnsComplexObjectFromStore()
var serializedData = _serializer.Serialize(objectToSave);
Assert.Equal(serializedData, result);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public GetItemAsync()
[InlineData("")]
[InlineData(" ")]
[InlineData(null)]
public void ThrowsArgumentNullException_When_KeyIsInvalid(string key)
public async Task ThrowsArgumentNullException_When_KeyIsInvalid(string key)
{
// arrange / act
var action = new Func<Task>(async () => await _sut.GetItemAsync<object>(key));

// assert
Assert.ThrowsAsync<ArgumentNullException>(action);
await Assert.ThrowsAsync<ArgumentNullException>(action);
}

[Theory]
Expand Down Expand Up @@ -102,4 +102,4 @@ public async Task ReturnsStringFromStore_When_JsonExceptionIsThrown()
// Assert
Assert.Equal(valueToSave, result);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public RemoveItemAsync()
[InlineData("")]
[InlineData(" ")]
[InlineData(null)]
public void ThrowsArgumentNullException_When_KeyIsInvalid(string key)
public async Task ThrowsArgumentNullException_When_KeyIsInvalid(string key)
{
// arrange / act
var action = new Func<Task>(async () => await _sut.RemoveItemAsync(key));

// assert
Assert.ThrowsAsync<ArgumentNullException>(action);
await Assert.ThrowsAsync<ArgumentNullException>(action);
}

[Fact]
Expand All @@ -66,4 +66,4 @@ public async Task DoesNothingWhenItemDoesNotExistInStore()
// Assert
Assert.Equal(0, await _storageProvider.LengthAsync());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,25 @@ public SetItemAsStringAsync()
[InlineData("")]
[InlineData(" ")]
[InlineData(null)]
public void ThrowsArgumentNullException_When_KeyIsInvalid(string key)
public async Task ThrowsArgumentNullException_When_KeyIsInvalid(string key)
{
// arrange / act
const string data = "Data";
var action = new Func<Task>(async () => await _sut.SetItemAsStringAsync(key, data));

// assert
Assert.ThrowsAsync<ArgumentNullException>(action);
await Assert.ThrowsAsync<ArgumentNullException>(action);
}

[Fact]
public void ThrowsArgumentNullException_When_DataIsNull()
public async Task ThrowsArgumentNullException_When_DataIsNull()
{
// arrange / act
var data = (string)null;
var action = new Func<Task>(async () => await _sut.SetItemAsStringAsync("MyValue", data));

// assert
Assert.ThrowsAsync<ArgumentNullException>(action);
await Assert.ThrowsAsync<ArgumentNullException>(action);
}

[Fact]
Expand Down Expand Up @@ -201,4 +201,4 @@ public async Task OnChangedEventContainsOldValue_When_UpdatingExistingData()
// assert
Assert.Equal(existingValue, oldValue);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public SetItemAsync()
[InlineData("")]
[InlineData(" ")]
[InlineData(null)]
public void ThrowsArgumentNullException_When_KeyIsInvalid(string key)
public async Task ThrowsArgumentNullException_When_KeyIsInvalid(string key)
{
// arrange / act
const string data = "Data";
var action = new Func<Task>(async () => await _sut.SetItemAsync(key, data));

// assert
Assert.ThrowsAsync<ArgumentNullException>(action);
await Assert.ThrowsAsync<ArgumentNullException>(action);
}

[Fact]
Expand Down Expand Up @@ -231,4 +231,4 @@ public async Task OnChangedEventContainsOldValue_When_UpdatingExistingData()
// assert
Assert.Equal(existingValue, oldValue);
}
}
}