-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* correct webfinger namespace * create unit test project, add poc unit test * move solution up one folder above src and test * remove working-directory from gh actions solution moved up a directory and we want to build/test all.
- Loading branch information
Showing
8 changed files
with
96 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.4.33103.184 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApp", "src\WebApp\WebApp.csproj", "{EF2B2EA7-D380-46EA-A2CE-D7C9D22B18FA}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{74FC9674-053B-480C-84AC-F6AAF8B82239}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9EC4E573-048F-40B7-8721-E28857532DF0}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApp.Test", "test\WebApp.Test\WebApp.Test.csproj", "{972B3171-DDE1-4CF8-863E-B45875440A80}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{EF2B2EA7-D380-46EA-A2CE-D7C9D22B18FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{EF2B2EA7-D380-46EA-A2CE-D7C9D22B18FA}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{EF2B2EA7-D380-46EA-A2CE-D7C9D22B18FA}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{EF2B2EA7-D380-46EA-A2CE-D7C9D22B18FA}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{972B3171-DDE1-4CF8-863E-B45875440A80}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{972B3171-DDE1-4CF8-863E-B45875440A80}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{972B3171-DDE1-4CF8-863E-B45875440A80}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{972B3171-DDE1-4CF8-863E-B45875440A80}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{EF2B2EA7-D380-46EA-A2CE-D7C9D22B18FA} = {74FC9674-053B-480C-84AC-F6AAF8B82239} | ||
{972B3171-DDE1-4CF8-863E-B45875440A80} = {9EC4E573-048F-40B7-8721-E28857532DF0} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {B464DC23-8514-4B57-BA12-524A7C3994FA} | ||
EndGlobalSection | ||
EndGlobal |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using AutoFixture.Xunit2; | ||
using Microsoft.AspNetCore.Http.HttpResults; | ||
using Smilodon.WebApp.Api.Webfinger; | ||
|
||
namespace WebApp.Test.Api.Webfinger | ||
{ | ||
public class WebfingerEndpointsTests | ||
{ | ||
[Theory, AutoData] | ||
public async Task GetAllAccountReturnsResource(string resourceName) | ||
{ | ||
var result = await WebfingerEndpoints.GetAllAccount(resourceName); | ||
result.Should().BeOfType<Ok<string>>() | ||
.Which.Value.Should().Be(resourceName); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
global using Xunit; | ||
global using FluentAssertions; | ||
global using AutoFixture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="AutoFixture" Version="4.17.0" /> | ||
<PackageReference Include="AutoFixture.Xunit2" Version="4.17.0" /> | ||
<PackageReference Include="FluentAssertions" Version="6.8.0" /> | ||
<PackageReference Include="FluentAssertions.Analyzers" Version="0.17.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<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"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="3.2.0"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\WebApp\WebApp.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |