From 31aea6272da074f01e5d5c63ef539a521a743c04 Mon Sep 17 00:00:00 2001 From: Gabriel Nehemias Date: Mon, 26 Aug 2024 13:32:51 -0400 Subject: [PATCH 1/8] main project supports .net8 --- src/Blazored.SessionStorage/Blazored.SessionStorage.csproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Blazored.SessionStorage/Blazored.SessionStorage.csproj b/src/Blazored.SessionStorage/Blazored.SessionStorage.csproj index 07ebd5d..07cd97b 100644 --- a/src/Blazored.SessionStorage/Blazored.SessionStorage.csproj +++ b/src/Blazored.SessionStorage/Blazored.SessionStorage.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0 + net6.0;net7.0;net8.0 Chris Sainty @@ -37,6 +37,10 @@ + + + + From 9480b613ec4bf852cb78760bce703d6683bdb497 Mon Sep 17 00:00:00 2001 From: Gabriel Nehemias Date: Mon, 26 Aug 2024 13:34:34 -0400 Subject: [PATCH 2/8] bumps BlazorServer example project to .net8 --- samples/BlazorServer/BlazorServer.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/BlazorServer/BlazorServer.csproj b/samples/BlazorServer/BlazorServer.csproj index 98d95a3..5526874 100644 --- a/samples/BlazorServer/BlazorServer.csproj +++ b/samples/BlazorServer/BlazorServer.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 From 29c4df71b8d5df32c41b492e19ec0c96139cea21 Mon Sep 17 00:00:00 2001 From: Gabriel Nehemias Date: Mon, 26 Aug 2024 13:34:51 -0400 Subject: [PATCH 3/8] BlazorServer example project uses latest Newtonsoft pkg --- samples/BlazorServer/BlazorServer.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/BlazorServer/BlazorServer.csproj b/samples/BlazorServer/BlazorServer.csproj index 5526874..d65420f 100644 --- a/samples/BlazorServer/BlazorServer.csproj +++ b/samples/BlazorServer/BlazorServer.csproj @@ -5,7 +5,7 @@ - + From 8fffea0d2fcfafe561f8934b8fa396b797d6caed Mon Sep 17 00:00:00 2001 From: Gabriel Nehemias Date: Mon, 26 Aug 2024 13:41:21 -0400 Subject: [PATCH 4/8] bUnitExample project uses .net8 and latest nugets --- samples/bUnitExample/bUnitExample.csproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/bUnitExample/bUnitExample.csproj b/samples/bUnitExample/bUnitExample.csproj index 5d0efb7..622e902 100644 --- a/samples/bUnitExample/bUnitExample.csproj +++ b/samples/bUnitExample/bUnitExample.csproj @@ -1,18 +1,18 @@ - net7.0 + net8.0 - - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all From 564839a4129b51335a91fbcc395209161ee6cdf9 Mon Sep 17 00:00:00 2001 From: Gabriel Nehemias Date: Mon, 26 Aug 2024 13:41:45 -0400 Subject: [PATCH 5/8] Blazor wasm example project uses .net8 and latest nugets --- samples/BlazorWebAssembly/BlazorWebAssembly.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/BlazorWebAssembly/BlazorWebAssembly.csproj b/samples/BlazorWebAssembly/BlazorWebAssembly.csproj index f1d4e0d..e84674a 100644 --- a/samples/BlazorWebAssembly/BlazorWebAssembly.csproj +++ b/samples/BlazorWebAssembly/BlazorWebAssembly.csproj @@ -1,13 +1,13 @@  - net7.0 + net8.0 - - - + + + From 15fc152b627cad4ea94e2775496c603e103c4dc4 Mon Sep 17 00:00:00 2001 From: Gabriel Nehemias Date: Mon, 26 Aug 2024 13:51:54 -0400 Subject: [PATCH 6/8] unit tests use .net8 and latest nugets --- .../Blazored.SessionStorage.Tests.csproj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Blazored.SessionStorage.Tests/Blazored.SessionStorage.Tests.csproj b/tests/Blazored.SessionStorage.Tests/Blazored.SessionStorage.Tests.csproj index 00c5d20..1c6ffaa 100644 --- a/tests/Blazored.SessionStorage.Tests/Blazored.SessionStorage.Tests.csproj +++ b/tests/Blazored.SessionStorage.Tests/Blazored.SessionStorage.Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net8.0 false @@ -11,16 +11,16 @@ - - - - - - + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive From c65da2138de7e7120d54226a2dceae851999b049 Mon Sep 17 00:00:00 2001 From: Gabriel Nehemias Date: Mon, 26 Aug 2024 13:52:30 -0400 Subject: [PATCH 7/8] unit tests use async/await as required by latest nugets --- .../SessionStorageServiceTests/GetItemAsStringAsync.cs | 6 +++--- .../SessionStorageServiceTests/GetItemAsync.cs | 6 +++--- .../SessionStorageServiceTests/RemoveItemAsync.cs | 6 +++--- .../SessionStorageServiceTests/SetItemAsStringAsync.cs | 10 +++++----- .../SessionStorageServiceTests/SetItemAsync.cs | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/GetItemAsStringAsync.cs b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/GetItemAsStringAsync.cs index a3dedb7..10a64c9 100644 --- a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/GetItemAsStringAsync.cs +++ b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/GetItemAsStringAsync.cs @@ -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(async () => await _sut.GetItemAsStringAsync(key)); // assert - Assert.ThrowsAsync(action); + await Assert.ThrowsAsync(action); } [Theory] @@ -75,4 +75,4 @@ public async Task ReturnsComplexObjectFromStore() var serializedData = _serializer.Serialize(objectToSave); Assert.Equal(serializedData, result); } -} \ No newline at end of file +} diff --git a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/GetItemAsync.cs b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/GetItemAsync.cs index 67de73f..02f5714 100644 --- a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/GetItemAsync.cs +++ b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/GetItemAsync.cs @@ -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(async () => await _sut.GetItemAsync(key)); // assert - Assert.ThrowsAsync(action); + await Assert.ThrowsAsync(action); } [Theory] @@ -102,4 +102,4 @@ public async Task ReturnsStringFromStore_When_JsonExceptionIsThrown() // Assert Assert.Equal(valueToSave, result); } -} \ No newline at end of file +} diff --git a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/RemoveItemAsync.cs b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/RemoveItemAsync.cs index cd138ee..fa0e631 100644 --- a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/RemoveItemAsync.cs +++ b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/RemoveItemAsync.cs @@ -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(async () => await _sut.RemoveItemAsync(key)); // assert - Assert.ThrowsAsync(action); + await Assert.ThrowsAsync(action); } [Fact] @@ -66,4 +66,4 @@ public async Task DoesNothingWhenItemDoesNotExistInStore() // Assert Assert.Equal(0, await _storageProvider.LengthAsync()); } -} \ No newline at end of file +} diff --git a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/SetItemAsStringAsync.cs b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/SetItemAsStringAsync.cs index 7857a1b..5d61006 100644 --- a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/SetItemAsStringAsync.cs +++ b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/SetItemAsStringAsync.cs @@ -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(async () => await _sut.SetItemAsStringAsync(key, data)); // assert - Assert.ThrowsAsync(action); + await Assert.ThrowsAsync(action); } [Fact] - public void ThrowsArgumentNullException_When_DataIsNull() + public async Task ThrowsArgumentNullException_When_DataIsNull() { // arrange / act var data = (string)null; var action = new Func(async () => await _sut.SetItemAsStringAsync("MyValue", data)); // assert - Assert.ThrowsAsync(action); + await Assert.ThrowsAsync(action); } [Fact] @@ -201,4 +201,4 @@ public async Task OnChangedEventContainsOldValue_When_UpdatingExistingData() // assert Assert.Equal(existingValue, oldValue); } -} \ No newline at end of file +} diff --git a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/SetItemAsync.cs b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/SetItemAsync.cs index 8aa1e49..87c799b 100644 --- a/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/SetItemAsync.cs +++ b/tests/Blazored.SessionStorage.Tests/SessionStorageServiceTests/SetItemAsync.cs @@ -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(async () => await _sut.SetItemAsync(key, data)); // assert - Assert.ThrowsAsync(action); + await Assert.ThrowsAsync(action); } [Fact] @@ -231,4 +231,4 @@ public async Task OnChangedEventContainsOldValue_When_UpdatingExistingData() // assert Assert.Equal(existingValue, oldValue); } -} \ No newline at end of file +} From 2e0cae84043f9238ef5da70bef33cf836293aca7 Mon Sep 17 00:00:00 2001 From: Gabriel Nehemias Date: Mon, 26 Aug 2024 13:56:00 -0400 Subject: [PATCH 8/8] test extensions support .net 8 and use latest nugets --- .../Blazored.SessionStorage.TestExtensions.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Blazored.SessionStorage.TestExtensions/Blazored.SessionStorage.TestExtensions.csproj b/src/Blazored.SessionStorage.TestExtensions/Blazored.SessionStorage.TestExtensions.csproj index 40800be..783183b 100644 --- a/src/Blazored.SessionStorage.TestExtensions/Blazored.SessionStorage.TestExtensions.csproj +++ b/src/Blazored.SessionStorage.TestExtensions/Blazored.SessionStorage.TestExtensions.csproj @@ -1,7 +1,7 @@  - net6.0;net7.0 + net6.0;net7.0;net8.0 Chris Sainty @@ -35,7 +35,7 @@ - +