core: relocate test classes (#9817)

This commit is contained in:
Diego Heras
2020-10-12 13:35:09 +02:00
committed by GitHub
parent 056605e681
commit 2654ba808c
11 changed files with 16 additions and 16 deletions

View File

@@ -7,7 +7,7 @@ using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
using Assert = NUnit.Framework.Assert;
namespace Jackett.Test.Definitions
namespace Jackett.Test.Common.Definitions
{
[TestFixture]
public class DefinitionsParserTests

View File

@@ -8,7 +8,7 @@ using Newtonsoft.Json.Linq;
using NUnit.Framework;
using Assert = NUnit.Framework.Assert;
namespace Jackett.Test.Models
namespace Jackett.Test.Common.Models
{
class TestIndexer : BaseIndexer
{

View File

@@ -6,7 +6,7 @@ using NUnit.Framework;
using Assert = NUnit.Framework.Assert;
using CollectionAssert = NUnit.Framework.CollectionAssert;
namespace Jackett.Test.Utils
namespace Jackett.Test.Common.Utils
{
[TestFixture]
public class CookieUtilTests

View File

@@ -1,8 +1,9 @@
using System;
using System.Collections.Generic;
using Jackett.Common.Utils;
using NUnit.Framework;
namespace Jackett.Common.Utils.Tests
namespace Jackett.Test.Common.Utils
{
[TestFixture]
public class DateTimeUtilTests

View File

@@ -6,7 +6,7 @@ using FluentAssertions;
using Jackett.Common.Utils;
using NUnit.Framework;
namespace Jackett.Test.Util
namespace Jackett.Test.Common.Utils
{
[TestFixture]
public class ParseUtilTests

View File

@@ -2,7 +2,7 @@ using Jackett.Common.Utils;
using Jackett.Common.Utils.Clients;
using NUnit.Framework;
namespace Jackett.Test.Util
namespace Jackett.Test.Common.Utils
{
[TestFixture]
internal class ServerUtilTests : TestBase

View File

@@ -2,9 +2,10 @@ using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using Jackett.Common.Utils;
using NUnit.Framework;
namespace Jackett.Common.Utils.Tests
namespace Jackett.Test.Common.Utils
{
[TestFixture]
public class StringUtilTests

View File

@@ -1,7 +1,7 @@
using Jackett.Common.Utils;
using NUnit.Framework;
namespace Jackett.Test.Util
namespace Jackett.Test.Common.Utils
{
[TestFixture]
internal class ParseTvShowQualityTest : TestBase

View File

@@ -10,15 +10,12 @@
<ItemGroup>
<Compile Remove="Indexers\**" />
<EmbeddedResource Remove="Indexers\**" />
<EmbeddedResource Include="Common\Utils\Invalid-RSS.xml" />
<None Remove="Indexers\**" />
</ItemGroup>
<ItemGroup>
<None Remove="Util\Invalid-RSS.xml" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Util\Invalid-RSS.xml" />
<None Remove="Common\Utils\Invalid-RSS.xml" />
</ItemGroup>
<ItemGroup>
@@ -39,7 +36,9 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Common" />
<Folder Include="Properties\" />
<Folder Include="Server" />
</ItemGroup>
<ItemGroup>

View File

@@ -3,19 +3,18 @@ using Jackett.Common.Models.Config;
using Jackett.Common.Services.Interfaces;
using NUnit.Framework;
namespace Jackett.Test.Services
namespace Jackett.Test.Server.Services
{
[TestFixture]
internal class ProtectionServiceTests : TestBase
{
[Test]
public void Should_be_able_to_encrypt_and_decrypt()
{
var ss = TestUtil.Container.Resolve<ServerConfig>();
ss.InstanceId = "12345678";
var ps = TestUtil.Container.Resolve<IProtectionService>();
var input = "test123";
const string input = "test123";
var protectedInput = ps.Protect(input);
var output = ps.UnProtect(protectedInput);