mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
core: relocate test classes (#9817)
This commit is contained in:
@@ -7,7 +7,7 @@ using YamlDotNet.Serialization;
|
|||||||
using YamlDotNet.Serialization.NamingConventions;
|
using YamlDotNet.Serialization.NamingConventions;
|
||||||
using Assert = NUnit.Framework.Assert;
|
using Assert = NUnit.Framework.Assert;
|
||||||
|
|
||||||
namespace Jackett.Test.Definitions
|
namespace Jackett.Test.Common.Definitions
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class DefinitionsParserTests
|
public class DefinitionsParserTests
|
@@ -8,7 +8,7 @@ using Newtonsoft.Json.Linq;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Assert = NUnit.Framework.Assert;
|
using Assert = NUnit.Framework.Assert;
|
||||||
|
|
||||||
namespace Jackett.Test.Models
|
namespace Jackett.Test.Common.Models
|
||||||
{
|
{
|
||||||
class TestIndexer : BaseIndexer
|
class TestIndexer : BaseIndexer
|
||||||
{
|
{
|
@@ -6,7 +6,7 @@ using NUnit.Framework;
|
|||||||
using Assert = NUnit.Framework.Assert;
|
using Assert = NUnit.Framework.Assert;
|
||||||
using CollectionAssert = NUnit.Framework.CollectionAssert;
|
using CollectionAssert = NUnit.Framework.CollectionAssert;
|
||||||
|
|
||||||
namespace Jackett.Test.Utils
|
namespace Jackett.Test.Common.Utils
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class CookieUtilTests
|
public class CookieUtilTests
|
@@ -1,8 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Jackett.Common.Utils;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace Jackett.Common.Utils.Tests
|
namespace Jackett.Test.Common.Utils
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class DateTimeUtilTests
|
public class DateTimeUtilTests
|
@@ -6,7 +6,7 @@ using FluentAssertions;
|
|||||||
using Jackett.Common.Utils;
|
using Jackett.Common.Utils;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace Jackett.Test.Util
|
namespace Jackett.Test.Common.Utils
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class ParseUtilTests
|
public class ParseUtilTests
|
@@ -2,7 +2,7 @@ using Jackett.Common.Utils;
|
|||||||
using Jackett.Common.Utils.Clients;
|
using Jackett.Common.Utils.Clients;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace Jackett.Test.Util
|
namespace Jackett.Test.Common.Utils
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
internal class ServerUtilTests : TestBase
|
internal class ServerUtilTests : TestBase
|
@@ -2,9 +2,10 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using Jackett.Common.Utils;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace Jackett.Common.Utils.Tests
|
namespace Jackett.Test.Common.Utils
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class StringUtilTests
|
public class StringUtilTests
|
@@ -1,7 +1,7 @@
|
|||||||
using Jackett.Common.Utils;
|
using Jackett.Common.Utils;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace Jackett.Test.Util
|
namespace Jackett.Test.Common.Utils
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
internal class ParseTvShowQualityTest : TestBase
|
internal class ParseTvShowQualityTest : TestBase
|
@@ -10,15 +10,12 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Indexers\**" />
|
<Compile Remove="Indexers\**" />
|
||||||
<EmbeddedResource Remove="Indexers\**" />
|
<EmbeddedResource Remove="Indexers\**" />
|
||||||
|
<EmbeddedResource Include="Common\Utils\Invalid-RSS.xml" />
|
||||||
<None Remove="Indexers\**" />
|
<None Remove="Indexers\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Util\Invalid-RSS.xml" />
|
<None Remove="Common\Utils\Invalid-RSS.xml" />
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Util\Invalid-RSS.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -39,7 +36,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Folder Include="Common" />
|
||||||
<Folder Include="Properties\" />
|
<Folder Include="Properties\" />
|
||||||
|
<Folder Include="Server" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@@ -3,19 +3,18 @@ using Jackett.Common.Models.Config;
|
|||||||
using Jackett.Common.Services.Interfaces;
|
using Jackett.Common.Services.Interfaces;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace Jackett.Test.Services
|
namespace Jackett.Test.Server.Services
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
internal class ProtectionServiceTests : TestBase
|
internal class ProtectionServiceTests : TestBase
|
||||||
{
|
{
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void Should_be_able_to_encrypt_and_decrypt()
|
public void Should_be_able_to_encrypt_and_decrypt()
|
||||||
{
|
{
|
||||||
var ss = TestUtil.Container.Resolve<ServerConfig>();
|
var ss = TestUtil.Container.Resolve<ServerConfig>();
|
||||||
ss.InstanceId = "12345678";
|
ss.InstanceId = "12345678";
|
||||||
var ps = TestUtil.Container.Resolve<IProtectionService>();
|
var ps = TestUtil.Container.Resolve<IProtectionService>();
|
||||||
var input = "test123";
|
const string input = "test123";
|
||||||
var protectedInput = ps.Protect(input);
|
var protectedInput = ps.Protect(input);
|
||||||
var output = ps.UnProtect(protectedInput);
|
var output = ps.UnProtect(protectedInput);
|
||||||
|
|
Reference in New Issue
Block a user