From 4cf0f53853209b8754373dbeb25427b24eeda7fe Mon Sep 17 00:00:00 2001 From: Ninja Date: Fri, 22 Nov 2024 20:48:30 +0000 Subject: [PATCH] - Upgrade to .Net 9.0 --- .github/workflows/Master-Build.yml | 2 +- .github/workflows/PullRequest-CI.yml | 2 +- GitVersion.yml | 2 +- README.md | 7 +++--- src/ApiAggregator/ApiAggregator.csproj | 6 ++--- .../Aggregator.Tests/ApiBuilderTests.cs | 18 +++++++-------- .../Aggregator.Tests/ContractBuilderTests.cs | 2 +- .../StringContainsMatcherTests.cs | 2 +- .../ApiAggregator.Tests.csproj | 22 ++++++++++++------- 9 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.github/workflows/Master-Build.yml b/.github/workflows/Master-Build.yml index b265d8a..0c2dca7 100644 --- a/.github/workflows/Master-Build.yml +++ b/.github/workflows/Master-Build.yml @@ -14,7 +14,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 9.0.x - name: Restore dependencies run: dotnet restore - name: Build diff --git a/.github/workflows/PullRequest-CI.yml b/.github/workflows/PullRequest-CI.yml index a8cf26c..9f76e6c 100644 --- a/.github/workflows/PullRequest-CI.yml +++ b/.github/workflows/PullRequest-CI.yml @@ -52,7 +52,7 @@ jobs: - name: Step-04 Install .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 9.0.x - name: Step-05 Restore dependencies run: dotnet restore diff --git a/GitVersion.yml b/GitVersion.yml index 89b0a62..280505f 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,4 +1,4 @@ -next-version: 1.0.0 +next-version: 2.0.0 tag-prefix: '[vV]' mode: ContinuousDeployment branches: diff --git a/README.md b/README.md index 886e952..a25046e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# ninja ApiAggregator v1.0 +# ninja ApiAggregator v2.0.0 [![NuGet version](https://badge.fury.io/nu/ApiAggregator.svg)](https://badge.fury.io/nu/ApiAggregator) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/CodeShayk/ApiAggregator/blob/master/LICENSE.md) [![Master-Build](https://github.com/CodeShayk/ApiAggregator/actions/workflows/Master-Build.yml/badge.svg)](https://github.com/CodeShayk/ApiAggregator/actions/workflows/Master-Build.yml) [![GitHub Release](https://img.shields.io/github/v/release/CodeShayk/ApiAggregator?logo=github&sort=semver)](https://github.com/CodeShayk/ApiAggregator/releases/latest) [![Master-CodeQL](https://github.com/CodeShayk/ApiAggregator/actions/workflows/Master-CodeQL.yml/badge.svg)](https://github.com/CodeShayk/ApiAggregator/actions/workflows/Master-CodeQL.yml) -[![.Net 8.0](https://img.shields.io/badge/.Net-8.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) +[![.Net 9.0](https://img.shields.io/badge/.Net-9.0-blue)](https://dotnet.microsoft.com/en-us/download/dotnet/9.0) -- ## Introduction ### What is ApiAggregator? @@ -38,9 +38,10 @@ If you are having problems, please let me know by [raising a new issue](https:// This project is licensed with the [MIT license](LICENSE). ## Version History -The main branch is now on .NET 8.0. The following previous versions are available: +The main branch is now on .NET 9.0. The following previous versions are available: | Version | Release Notes | | -------- | --------| +| [`v2.0.0`](https://github.com/CodeShayk/ApiAggregator/tree/v2.0.0) | [Notes](https://github.com/CodeShayk/ApiAggregator/releases/tag/v2.0.0) | | [`v1.0.0`](https://github.com/CodeShayk/ApiAggregator/tree/v1.0.0) | [Notes](https://github.com/CodeShayk/ApiAggregator/releases/tag/v1.0.0) | ## Credits diff --git a/src/ApiAggregator/ApiAggregator.csproj b/src/ApiAggregator/ApiAggregator.csproj index d1f180c..a860e03 100644 --- a/src/ApiAggregator/ApiAggregator.csproj +++ b/src/ApiAggregator/ApiAggregator.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable ApiAggregator @@ -20,7 +20,7 @@ True https://github.com/CodeShayk/ApiAggregator/wiki https://github.com/CodeShayk/ApiAggregator - v1.0 + v2.0 - Targets .Net9.0 - Includes core functionality for aggregating apis. @@ -44,7 +44,7 @@ - + diff --git a/tests/ApiAggregator.Tests/Aggregator.Tests/ApiBuilderTests.cs b/tests/ApiAggregator.Tests/Aggregator.Tests/ApiBuilderTests.cs index d0d97a4..d79bae1 100644 --- a/tests/ApiAggregator.Tests/Aggregator.Tests/ApiBuilderTests.cs +++ b/tests/ApiAggregator.Tests/Aggregator.Tests/ApiBuilderTests.cs @@ -28,7 +28,7 @@ public void TestApiBuilderForCorrectParentApiList() var result = _apiBuilder.Build(context); - Assert.IsNotNull(result); + Assert.That(result, Is.Not.Null); Assert.That(result.ApiNestingDepth == 0); Assert.That(result.Apis.Count, Is.EqualTo(1)); @@ -45,7 +45,7 @@ public void TestApiBuilderForCorrectParentApiListWithOneChildren() var result = _apiBuilder.Build(context); - Assert.IsNotNull(result); + Assert.That(result, Is.Not.Null); Assert.That(result.ApiNestingDepth == 0); Assert.That(result.Apis.Count, Is.EqualTo(1)); @@ -65,7 +65,7 @@ public void TestApiBuilderForCorrectParentApiListWithTwoChildren() var result = _apiBuilder.Build(context); - Assert.IsNotNull(result); + Assert.That(result, Is.Not.Null); Assert.That(result.ApiNestingDepth == 0); Assert.That(result.Apis.Count, Is.EqualTo(1)); @@ -77,8 +77,8 @@ public void TestApiBuilderForCorrectParentApiListWithTwoChildren() var communicationApi = parentApi.Children.FirstOrDefault(x => x.GetType() == typeof(CommunicationApi)); var ordersApi = parentApi.Children.FirstOrDefault(x => x.GetType() == typeof(OrdersApi)); - Assert.IsNotNull(communicationApi); - Assert.IsNotNull(ordersApi); + Assert.That(communicationApi, Is.Not.Null); + Assert.That(ordersApi, Is.Not.Null); Assert.That(ordersApi.Children.Count, Is.EqualTo(0)); } @@ -90,7 +90,7 @@ public void TestApiBuilderForCorrectParentApiListWithTwoChildrenAndOneChildFurth var result = _apiBuilder.Build(context); - Assert.IsNotNull(result); + Assert.That(result, Is.Not.Null); Assert.That(result.ApiNestingDepth == 0); Assert.That(result.Apis.Count, Is.EqualTo(1)); @@ -102,14 +102,14 @@ public void TestApiBuilderForCorrectParentApiListWithTwoChildrenAndOneChildFurth var communicationApi = parentApi.Children.FirstOrDefault(x => x.GetType() == typeof(CommunicationApi)); var ordersApi = parentApi.Children.FirstOrDefault(x => x.GetType() == typeof(OrdersApi)); - Assert.IsNotNull(communicationApi); - Assert.IsNotNull(ordersApi); + Assert.That(communicationApi, Is.Not.Null); + Assert.That(ordersApi, Is.Not.Null); // nested child query for order item in order query children as order items are included in paths Assert.That(ordersApi.Children.Count, Is.EqualTo(1)); var orderItemsApi = ordersApi.Children.FirstOrDefault(x => x.GetType() == typeof(OrderItemsApi)); - Assert.IsNotNull(orderItemsApi); + Assert.That(orderItemsApi, Is.Not.Null); } } } \ No newline at end of file diff --git a/tests/ApiAggregator.Tests/Aggregator.Tests/ContractBuilderTests.cs b/tests/ApiAggregator.Tests/Aggregator.Tests/ContractBuilderTests.cs index aa7d7a0..fe7840e 100644 --- a/tests/ApiAggregator.Tests/Aggregator.Tests/ContractBuilderTests.cs +++ b/tests/ApiAggregator.Tests/Aggregator.Tests/ContractBuilderTests.cs @@ -51,7 +51,7 @@ public void TestContractBuilderForCorrectExecutionOfConfiguredTransforms() Assert.That(orderItemsCollectionTransforms.Count() == 1); Assert.That(orderItemsCollectionTransforms.ElementAt(0).InvocationCount == 1); - Assert.IsNotNull(contract); + Assert.That(contract, Is.Not.Null); } public class MockTransform : ResultTransformer diff --git a/tests/ApiAggregator.Tests/Aggregator.Tests/StringContainsMatcherTests.cs b/tests/ApiAggregator.Tests/Aggregator.Tests/StringContainsMatcherTests.cs index 5e506ad..ba744e7 100644 --- a/tests/ApiAggregator.Tests/Aggregator.Tests/StringContainsMatcherTests.cs +++ b/tests/ApiAggregator.Tests/Aggregator.Tests/StringContainsMatcherTests.cs @@ -14,7 +14,7 @@ public void TestMatcher(string input, string config) { var matcher = new StringContainsMatcher(); - Assert.True(matcher.IsMatch(input, With.Name(config))); + Assert.That(matcher.IsMatch(input, With.Name(config)), Is.True); } } } \ No newline at end of file diff --git a/tests/ApiAggregator.Tests/ApiAggregator.Tests.csproj b/tests/ApiAggregator.Tests/ApiAggregator.Tests.csproj index 65133bc..80983dd 100644 --- a/tests/ApiAggregator.Tests/ApiAggregator.Tests.csproj +++ b/tests/ApiAggregator.Tests/ApiAggregator.Tests.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net9.0 enable enable @@ -10,12 +10,18 @@ - - - - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + +