Skip to content

Commit

Permalink
v1.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-nitehawk committed Nov 28, 2023
1 parent 1b929ff commit 5659d13
Show file tree
Hide file tree
Showing 14 changed files with 213 additions and 212 deletions.
2 changes: 1 addition & 1 deletion FastEndpoints.TemplatePack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>

<Version>1.3.3</Version>
<Version>1.4.0</Version>

<PackageType>Template</PackageType>
<PackageId>FastEndpoints.TemplatePack</PackageId>
Expand Down
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- upgrade to .net 8
- upgrade dependencies to latest
- minor template refactoring
- refactor to use primary constructors
- update `.editorconfig` file
365 changes: 187 additions & 178 deletions templates/project/.editorconfig

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion templates/project/Source/Features/SayHello/Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sealed class Request
public string FirstName { get; set; }
public string LastName { get; set; }

sealed class Validator : Validator<Request>
internal sealed class Validator : Validator<Request>
{
public Validator()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
global using FastEndpoints;
global using FastEndpoints.Swagger;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Tests")]
8 changes: 4 additions & 4 deletions templates/project/Source/MyProject.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
Expand All @@ -10,9 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FastEndpoints" Version="5.19.0" />
<PackageReference Include="FastEndpoints.Security" Version="5.19.0" />
<PackageReference Include="FastEndpoints.Swagger" Version="5.19.0" />
<PackageReference Include="FastEndpoints" Version="5.20.0" />
<PackageReference Include="FastEndpoints.Security" Version="5.20.0" />
<PackageReference Include="FastEndpoints.Swagger" Version="5.20.0" />
</ItemGroup>

</Project>
2 changes: 0 additions & 2 deletions templates/project/Source/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using FastEndpoints.Swagger;

var bld = WebApplication.CreateBuilder(args);
bld.Services
.AddFastEndpoints()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
global using FastEndpoints;
global using FastEndpoints.Testing;
global using FluentAssertions;
global using Microsoft.Extensions.DependencyInjection;
global using System.Net;
global using Xunit;
global using Xunit.Abstractions;
global using Xunit.Priority;
global using Xunit.Priority;
6 changes: 2 additions & 4 deletions templates/project/Tests/SayHello/Fixture.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
namespace Tests.SayHello;

public class Fixture : TestFixture<Program>
public class Fixture(IMessageSink s) : TestFixture<Program>(s)
{
public Fixture(IMessageSink s) : base(s) { }

protected override Task SetupAsync()
{
// place one-time setup for the test-class here
Expand All @@ -20,4 +18,4 @@ protected override Task TearDownAsync()
// do cleanups here
return Task.CompletedTask;
}
}
}
4 changes: 1 addition & 3 deletions templates/project/Tests/SayHello/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

namespace Tests.SayHello;

public class Tests : TestClass<Fixture>
public class Tests(Fixture f, ITestOutputHelper o) : TestClass<Fixture>(f, o)
{
public Tests(Fixture f, ITestOutputHelper o) : base(f, o) { }

[Fact, Priority(1)]
public async Task Invalid_User_Input()
{
Expand Down
10 changes: 5 additions & 5 deletions templates/project/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FastEndpoints.Testing" Version="5.19.0" />
<PackageReference Include="FastEndpoints.Testing" Version="5.20.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
</ItemGroup>

Expand Down
File renamed without changes.
9 changes: 2 additions & 7 deletions templates/test/Tests/Sample/SampleTests.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
namespace Tests.Sample;

public class MyFixture : TestFixture<Program>
{
public MyFixture(IMessageSink s) : base(s) { }
}
public class MyFixture(IMessageSink s) : TestFixture<Program>(s) {}

public class SampleTests : TestClass<MyFixture>
public class SampleTests(MyFixture f, ITestOutputHelper o) : TestClass<MyFixture>(f, o)
{
public SampleTests(MyFixture f, ITestOutputHelper o) : base(f, o) { }

[Fact]
public void Sample_Test()
{
Expand Down
10 changes: 5 additions & 5 deletions templates/test/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsTestProject>true</IsTestProject>
<RootNamespace>Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FastEndpoints.Testing" Version="5.18.0" />
<PackageReference Include="FastEndpoints.Testing" Version="5.20.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
</ItemGroup>

Expand Down

0 comments on commit 5659d13

Please sign in to comment.