mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-01-13 15:27:59 +03:00
Remove Gen2 namespace from tests.
This commit is contained in:
parent
61377411a1
commit
13f97d706a
@ -1,13 +1,11 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2
|
||||
namespace Syroot.Worms.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="Archive"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Gen2")]
|
||||
[TestClass]
|
||||
public class ArchiveTests
|
||||
{
|
||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Armageddon
|
||||
namespace Syroot.Worms.Test.Armageddon
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="GeneratedMap"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Armageddon")]
|
||||
[TestClass]
|
||||
public class GeneratedMapTests
|
||||
{
|
||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Armageddon
|
||||
namespace Syroot.Worms.Test.Armageddon
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Armageddon")]
|
||||
[TestClass]
|
||||
public class LandDataTests
|
||||
{
|
||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon.ProjectX;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Armageddon.ProjectX
|
||||
namespace Syroot.Worms.Test.Armageddon.ProjectX
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="Library"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("ProjectX")]
|
||||
[TestClass]
|
||||
public class LibraryTests
|
||||
{
|
||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon.ProjectX;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Armageddon.ProjectX
|
||||
namespace Syroot.Worms.Test.Armageddon.ProjectX
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="Scheme"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("ProjectX")]
|
||||
[TestClass]
|
||||
public class SchemeTests
|
||||
{
|
||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Armageddon
|
||||
namespace Syroot.Worms.Test.Armageddon
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="Scheme"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Armageddon")]
|
||||
[TestClass]
|
||||
public class SchemeTests
|
||||
{
|
||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Armageddon;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Armageddon
|
||||
namespace Syroot.Worms.Test.Armageddon
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Armageddon")]
|
||||
[TestClass]
|
||||
public class TeamContainerTests
|
||||
{
|
||||
|
@ -47,15 +47,13 @@ namespace Syroot.Worms.Test.Common
|
||||
}
|
||||
|
||||
// ---- METHODS (PRIVATE) --------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
private static List<string> FindFiles(Game games, string wildcard)
|
||||
{
|
||||
List<string> gamePaths = GetGamePaths(games);
|
||||
List<string> files = new List<string>();
|
||||
foreach (string testPath in gamePaths)
|
||||
{
|
||||
files.AddRange(Directory.GetFiles(testPath, wildcard, SearchOption.AllDirectories));
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
@ -63,17 +61,11 @@ namespace Syroot.Worms.Test.Common
|
||||
{
|
||||
List<string> gamePaths = new List<string>();
|
||||
if (game.HasFlag(Game.Worms2))
|
||||
{
|
||||
gamePaths.AddRange(_gamePathsWorms2);
|
||||
}
|
||||
if (game.HasFlag(Game.WormsArmageddon))
|
||||
{
|
||||
gamePaths.AddRange(_gamePathsWormsArmageddon);
|
||||
}
|
||||
if (game.HasFlag(Game.WormsWorldParty))
|
||||
{
|
||||
gamePaths.AddRange(_gamePathsWormsWorldParty);
|
||||
}
|
||||
return gamePaths;
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,11 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2
|
||||
namespace Syroot.Worms.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="Img"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Gen2")]
|
||||
[TestClass]
|
||||
public class ImageTests
|
||||
{
|
||||
|
32
src/Syroot.Worms.Test/OnlineWorms/LaunchConfigTests.cs
Normal file
32
src/Syroot.Worms.Test/OnlineWorms/LaunchConfigTests.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.OnlineWorms;
|
||||
|
||||
namespace Syroot.Worms.Test.OnlineWorms
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="LaunchConfig"/> class.
|
||||
/// </summary>
|
||||
[TestClass]
|
||||
public class LaunchConfigTests
|
||||
{
|
||||
// ---- METHODS (PUBLIC) ---------------------------------------------------------------------------------------
|
||||
|
||||
/// <summary>
|
||||
/// Tests if encryptind and decrypting passwords yields the same results.
|
||||
/// </summary>
|
||||
[TestMethod]
|
||||
public void CryptPassword()
|
||||
{
|
||||
LaunchConfig launchConfig = new LaunchConfig();
|
||||
Random random = new Random(326988912);
|
||||
foreach (string password in new[] { "Unknown123Test", "blablabl10235", "3252380", "SJDAKDFJS", "fdsklfj" })
|
||||
{
|
||||
uint key = (uint)random.Next(0, Int32.MaxValue);
|
||||
launchConfig.SetPassword(password, key);
|
||||
string decryptedPassword = launchConfig.GetPassword();
|
||||
Assert.Equals(password, decryptedPassword);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +1,11 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms;
|
||||
using Syroot.Worms.Test.Common;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2
|
||||
namespace Syroot.Worms.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="RiffPalette"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Gen2")]
|
||||
[TestClass]
|
||||
public class PaletteTests
|
||||
{
|
||||
|
@ -3,10 +3,9 @@
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.1.11" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.1.11" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
|
||||
<ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -1,13 +1,12 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.WorldParty;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.WorldParty;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.WorldParty
|
||||
namespace Syroot.Worms.Test.WorldParty
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("WorldParty")]
|
||||
[TestClass]
|
||||
public class LandDataTests
|
||||
{
|
||||
|
@ -1,13 +1,12 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.WorldParty;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.WorldParty;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.WorldParty
|
||||
namespace Syroot.Worms.Test.WorldParty
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("WorldParty")]
|
||||
[TestClass]
|
||||
public class TeamContainerTests
|
||||
{
|
||||
|
@ -1,13 +1,12 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Worms2;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Worms2;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Worms2
|
||||
namespace Syroot.Worms.Test.Worms2
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Worms2")]
|
||||
[TestClass]
|
||||
public class LandDataTests
|
||||
{
|
||||
|
@ -1,13 +1,12 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Worms2;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Worms2;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Worms2
|
||||
namespace Syroot.Worms.Test.Worms2
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="SchemeOptions"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Worms2")]
|
||||
[TestClass]
|
||||
public class SchemeOptionsTests
|
||||
{
|
||||
|
@ -1,13 +1,12 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Worms2;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Worms2;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Worms2
|
||||
namespace Syroot.Worms.Test.Worms2
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="SchemeWeapons"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Worms2")]
|
||||
[TestClass]
|
||||
public class SchemeWeaponsTests
|
||||
{
|
||||
|
@ -1,13 +1,12 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using Syroot.Worms.Worms2;
|
||||
using Syroot.Worms.Test.Common;
|
||||
using Syroot.Worms.Worms2;
|
||||
|
||||
namespace Syroot.Worms.Test.Gen2.Worms2
|
||||
namespace Syroot.Worms.Test.Worms2
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
||||
/// </summary>
|
||||
[TestCategory("Worms2")]
|
||||
[TestClass]
|
||||
public class TeamContainerTests
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user