Skip to content

Commit

Permalink
- Upgrade to .Net 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
NinjaRocks committed Nov 22, 2024
1 parent 86ad8d3 commit 4cf0f53
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Master-Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PullRequest-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
next-version: 1.0.0
next-version: 2.0.0
tag-prefix: '[vV]'
mode: ContinuousDeployment
branches:
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# <img src="https://github.com/CodeShayk/ApiAggregator/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> ApiAggregator v1.0
# <img src="https://github.com/CodeShayk/ApiAggregator/blob/master/Images/ninja-icon-16.png" alt="ninja" style="width:30px;"/> 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?
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/ApiAggregator/ApiAggregator.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Title>ApiAggregator</Title>
Expand All @@ -20,7 +20,7 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageProjectUrl>https://github.com/CodeShayk/ApiAggregator/wiki</PackageProjectUrl>
<RepositoryUrl>https://github.com/CodeShayk/ApiAggregator</RepositoryUrl>
<PackageReleaseNotes>v1.0
<PackageReleaseNotes>v2.0 - Targets .Net9.0
- Includes core functionality for aggregating apis.</PackageReleaseNotes>
</PropertyGroup>

Expand All @@ -44,7 +44,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions tests/ApiAggregator.Tests/Aggregator.Tests/ApiBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
Expand All @@ -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));
Expand All @@ -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));
}
Expand All @@ -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));
Expand All @@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<TResult, TContract> : ResultTransformer<TResult, TContract>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
22 changes: 14 additions & 8 deletions tests/ApiAggregator.Tests/ApiAggregator.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -10,12 +10,18 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="Moq" Version="4.20.69" />
<PackageReference Include="NUnit.Analyzers" Version="3.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit" Version="4.2.2" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="NUnit.Analyzers" Version="4.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="WireMock.Net" Version="1.6.7" />
</ItemGroup>

Expand Down

0 comments on commit 4cf0f53

Please sign in to comment.