The Free Software Media System - Server Backend & API
Merge MediaBrowser.Api.Tests into Jellyfin.Api.Tests
Erwin de Haan1c71ddc42664
diff --git a/.vscode/tasks.json b/.vscode/tasks.jsonindex 7ddc49d5ce..09c523eb28 100644--- a/.vscode/tasks.json+++ b/.vscode/tasks.json@@ -17,7 +17,7 @@"type": "process","args": ["test",- "${workspaceFolder}/tests/MediaBrowser.Api.Tests/MediaBrowser.Api.Tests.csproj"+ "${workspaceFolder}/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj"],"problemMatcher": "$msCompile"}diff --git a/MediaBrowser.sln b/MediaBrowser.slnindex 75587da1f8..fd45dca2af 100644--- a/MediaBrowser.sln+++ b/MediaBrowser.sln@@ -66,8 +66,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jellyfin.Data", "Jellyfin.DEndProjectProject("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jellyfin.Server.Implementations", "Jellyfin.Server.Implementations\Jellyfin.Server.Implementations.csproj", "{DAE48069-6D86-4BA6-B148-D1D49B6DDA52}"EndProject-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MediaBrowser.Api.Tests", "tests\MediaBrowser.Api.Tests\MediaBrowser.Api.Tests.csproj", "{7C93C84F-105C-48E5-A878-406FA0A5B296}"-EndProjectGlobalGlobalSection(SolutionConfigurationPlatforms) = preSolutionDebug|Any CPU = Debug|Any CPU@@ -178,10 +176,6 @@ Global{DAE48069-6D86-4BA6-B148-D1D49B6DDA52}.Debug|Any CPU.Build.0 = Debug|Any CPU{DAE48069-6D86-4BA6-B148-D1D49B6DDA52}.Release|Any CPU.ActiveCfg = Release|Any CPU{DAE48069-6D86-4BA6-B148-D1D49B6DDA52}.Release|Any CPU.Build.0 = Release|Any CPU- {7C93C84F-105C-48E5-A878-406FA0A5B296}.Debug|Any CPU.ActiveCfg = Debug|Any CPU- {7C93C84F-105C-48E5-A878-406FA0A5B296}.Debug|Any CPU.Build.0 = Debug|Any CPU- {7C93C84F-105C-48E5-A878-406FA0A5B296}.Release|Any CPU.ActiveCfg = Release|Any CPU- {7C93C84F-105C-48E5-A878-406FA0A5B296}.Release|Any CPU.Build.0 = Release|Any CPUEndGlobalSectionGlobalSection(SolutionProperties) = preSolutionHideSolutionNode = FALSEdiff --git a/tests/MediaBrowser.Api.Tests/BrandingServiceTests.cs b/tests/Jellyfin.Api.Tests/BrandingServiceTests.cssimilarity index 97%rename from tests/MediaBrowser.Api.Tests/BrandingServiceTests.csrename to tests/Jellyfin.Api.Tests/BrandingServiceTests.csindex 5d7f7765cd..6fc287420b 100644--- a/tests/MediaBrowser.Api.Tests/BrandingServiceTests.cs+++ b/tests/Jellyfin.Api.Tests/BrandingServiceTests.cs@@ -3,7 +3,7 @@ using System.Threading.Tasks;using MediaBrowser.Model.Branding;using Xunit;-namespace MediaBrowser.Api.Tests+namespace Jellyfin.Api.Tests{public sealed class BrandingServiceTests : IClassFixture<JellyfinApplicationFactory>{diff --git a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csprojindex 368b6bf0bd..bcba3a2032 100644--- a/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj+++ b/tests/Jellyfin.Api.Tests/Jellyfin.Api.Tests.csproj@@ -16,6 +16,7 @@<PackageReference Include="AutoFixture" Version="4.13.0" /><PackageReference Include="AutoFixture.AutoMoq" Version="4.13.0" /><PackageReference Include="AutoFixture.Xunit2" Version="4.13.0" />+ <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.7" /><PackageReference Include="Microsoft.Extensions.Options" Version="3.1.7" /><PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" /><PackageReference Include="xunit" Version="2.4.1" />diff --git a/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs b/tests/Jellyfin.Api.Tests/JellyfinApplicationFactory.cssimilarity index 99%rename from tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.csrename to tests/Jellyfin.Api.Tests/JellyfinApplicationFactory.csindex 2029f88e92..77f1640fa3 100644--- a/tests/MediaBrowser.Api.Tests/JellyfinApplicationFactory.cs+++ b/tests/Jellyfin.Api.Tests/JellyfinApplicationFactory.cs@@ -15,7 +15,7 @@ using Microsoft.Extensions.Logging;using Serilog;using Serilog.Extensions.Logging;-namespace MediaBrowser.Api.Tests+namespace Jellyfin.Api.Tests{/// <summary>/// Factory for bootstrapping the Jellyfin application in memory for functional end to end tests.diff --git a/tests/Jellyfin.Api.Tests/OpenApiSpecTests.cs b/tests/Jellyfin.Api.Tests/OpenApiSpecTests.csindex e054908f3e..3a85b55141 100644--- a/tests/Jellyfin.Api.Tests/OpenApiSpecTests.cs+++ b/tests/Jellyfin.Api.Tests/OpenApiSpecTests.cs@@ -6,7 +6,7 @@ using MediaBrowser.Model.Branding;using Xunit;using Xunit.Abstractions;-namespace MediaBrowser.Api.Tests+namespace Jellyfin.Api.Tests{public sealed class OpenApiSpecTests : IClassFixture<JellyfinApplicationFactory>{diff --git a/tests/MediaBrowser.Api.Tests/MediaBrowser.Api.Tests.csproj b/tests/MediaBrowser.Api.Tests/MediaBrowser.Api.Tests.csprojdeleted file mode 100644index b3fd853e2c..0000000000--- a/tests/MediaBrowser.Api.Tests/MediaBrowser.Api.Tests.csproj+++ /dev/null@@ -1,34 +0,0 @@-<Project Sdk="Microsoft.NET.Sdk">-- <PropertyGroup>- <TargetFramework>netcoreapp3.1</TargetFramework>- <IsPackable>false</IsPackable>- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>- <Nullable>enable</Nullable>- </PropertyGroup>-- <ItemGroup>- <PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.7" />- <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />- <PackageReference Include="xunit" Version="2.4.1" />- <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />- <PackageReference Include="coverlet.collector" Version="1.3.0" />- </ItemGroup>-- <ItemGroup>- <ProjectReference Include="..\..\Jellyfin.Server\Jellyfin.Server.csproj" />- </ItemGroup>-- <!-- Code Analyzers -->- <ItemGroup Condition=" '$(Configuration)' == 'Debug' ">- <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" PrivateAssets="All" />- <PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />- <PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />- <PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />- </ItemGroup>-- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">- <CodeAnalysisRuleSet>../jellyfin-tests.ruleset</CodeAnalysisRuleSet>- </PropertyGroup>--</Project>diff --git a/tests/jellyfin-tests.ruleset b/tests/jellyfin-tests.rulesetindex 5a113e955e..e2abaf5bb8 100644--- a/tests/jellyfin-tests.ruleset+++ b/tests/jellyfin-tests.ruleset@@ -1,5 +1,5 @@<?xml version="1.0" encoding="utf-8"?>-<RuleSet Name="Rules for MediaBrowser.Api.Tests" Description="Code analysis rules for MediaBrowser.Api.Tests.csproj" ToolsVersion="14.0">+<RuleSet Name="Rules for Jellyfin.Api.Tests" Description="Code analysis rules for Jellyfin.Api.Tests.csproj" ToolsVersion="14.0"><!-- Include the solution default RuleSet. The rules in this file will override the defaults. --><Include Path="../jellyfin.ruleset" Action="Default" />@@ -17,6 +17,6 @@<!-- CA2007: Consider calling ConfigureAwait on the awaited task --><Rule Id="CA2007" Action="None" /><!-- CA2234: Pass system uri objects instead of strings -->- <Rule Id="CA2234" Action="Info" />+ <Rule Id="CA2234" Action="Info" /></Rules></RuleSet>