mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-07 10:14:13 -04:00
Removing old UT
This commit is contained in:
parent
87d01c6044
commit
24e701be38
@ -1,21 +0,0 @@
|
||||
using Kyoo.InternalAPI;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace UnitTests.Kyoo_InternalAPI
|
||||
{
|
||||
public class LibraryTests
|
||||
{
|
||||
private IConfiguration config;
|
||||
private ILibraryManager libraryManager;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
config = new ConfigurationBuilder()
|
||||
.AddJsonFile("appsettings.json")
|
||||
.Build();
|
||||
libraryManager = new LibraryManager(config);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
using Kyoo.InternalAPI;
|
||||
using Kyoo.InternalAPI.ThumbnailsManager;
|
||||
using Kyoo.Models;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NUnit.Framework;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace UnitTests.Kyoo_InternalAPI
|
||||
{
|
||||
public class ThumbnailsTests
|
||||
{
|
||||
private IConfiguration config;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
config = new ConfigurationBuilder()
|
||||
.AddJsonFile("appsettings.json")
|
||||
.Build();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task DownloadShowImages()
|
||||
{
|
||||
LibraryManager library = new LibraryManager(config);
|
||||
ThumbnailsManager manager = new ThumbnailsManager(config);
|
||||
Show show = library.GetShowBySlug(library.GetShows().FirstOrDefault().Slug);
|
||||
Debug.WriteLine("&Show: " + show.Path);
|
||||
string posterPath = Path.Combine(show.Path, "poster.jpg");
|
||||
File.Delete(posterPath);
|
||||
|
||||
await manager.Validate(show);
|
||||
long posterLength = new FileInfo(posterPath).Length;
|
||||
Assert.IsTrue(posterLength > 0, "Poster size is zero for the tested show (" + posterPath + ")");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<RootNamespace>UnitTests</RootNamespace>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
|
||||
<AssemblyName>UnitTests</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.0.0" />
|
||||
<PackageReference Include="nunit" Version="3.12.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Kyoo\Kyoo.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"server.urls": "http://0.0.0.0:5000",
|
||||
"https_port": 44300,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
|
||||
"databasePath": "C://Projects/database.db",
|
||||
"tempPath": "C:\\\\Projects\\temp",
|
||||
"peoplePath": "D:\\\\Videos\\People",
|
||||
"plugins": "C:\\Projects\\Kyoo\\Debug",
|
||||
"providerPlugins": "C://Projects/Plugins/Providers",
|
||||
"regex": "^(\\\\(?<Collection>.+?))?\\\\.*\\\\(?<ShowTitle>.+?) S(?<Season>\\d+)E(?<Episode>\\d+)",
|
||||
"absoluteRegex": ".*\\\\(?<ShowTitle>.+?) (?<AbsoluteNumber>\\d+)"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user