Skip to content

Commit

Permalink
✅ Added test project
Browse files Browse the repository at this point in the history
  • Loading branch information
LNA-DEV committed Sep 24, 2024
1 parent 5076e8b commit 2ddb72d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 6 deletions.
1 change: 1 addition & 0 deletions OpenMediaServer.Test/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using Xunit;
29 changes: 29 additions & 0 deletions OpenMediaServer.Test/OpenMediaServer.Test.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

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

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.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="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OpenMediaServer\OpenMediaServer.csproj" />
</ItemGroup>

</Project>
10 changes: 10 additions & 0 deletions OpenMediaServer.Test/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace OpenMediaServer.Test;

public class UnitTest1
{
[Fact]
public void Test1()
{

}
}
6 changes: 6 additions & 0 deletions OpenMediaServer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenMediaServer", "OpenMediaServer\OpenMediaServer.csproj", "{9F2080C5-B689-431A-A98C-2CADFF0E2F2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenMediaServer.Test", "OpenMediaServer.Test\OpenMediaServer.Test.csproj", "{32855A81-0386-4A03-969D-3F81976D73E9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -18,5 +20,9 @@ Global
{9F2080C5-B689-431A-A98C-2CADFF0E2F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F2080C5-B689-431A-A98C-2CADFF0E2F2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F2080C5-B689-431A-A98C-2CADFF0E2F2C}.Release|Any CPU.Build.0 = Release|Any CPU
{32855A81-0386-4A03-969D-3F81976D73E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32855A81-0386-4A03-969D-3F81976D73E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32855A81-0386-4A03-969D-3F81976D73E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32855A81-0386-4A03-969D-3F81976D73E9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
10 changes: 4 additions & 6 deletions OpenMediaServer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@

var app = builder.Build();

if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();
app.UseSwagger();
app.UseSwaggerUI();


app.UseHttpsRedirection();


var contentDiscoveryService = app.Services.GetService<IContentDiscoveryService>();
Expand Down

0 comments on commit 2ddb72d

Please sign in to comment.