mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-01-15 00:08:02 +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 Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2
|
namespace Syroot.Worms.Test
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="Archive"/> class.
|
/// Represents a collection of tests for the <see cref="Archive"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Gen2")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class ArchiveTests
|
public class ArchiveTests
|
||||||
{
|
{
|
||||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|||||||
using Syroot.Worms.Armageddon;
|
using Syroot.Worms.Armageddon;
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Armageddon
|
namespace Syroot.Worms.Test.Armageddon
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="GeneratedMap"/> class.
|
/// Represents a collection of tests for the <see cref="GeneratedMap"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Armageddon")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class GeneratedMapTests
|
public class GeneratedMapTests
|
||||||
{
|
{
|
||||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|||||||
using Syroot.Worms.Armageddon;
|
using Syroot.Worms.Armageddon;
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Armageddon
|
namespace Syroot.Worms.Test.Armageddon
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Armageddon")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class LandDataTests
|
public class LandDataTests
|
||||||
{
|
{
|
||||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|||||||
using Syroot.Worms.Armageddon.ProjectX;
|
using Syroot.Worms.Armageddon.ProjectX;
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Armageddon.ProjectX
|
namespace Syroot.Worms.Test.Armageddon.ProjectX
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="Library"/> class.
|
/// Represents a collection of tests for the <see cref="Library"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("ProjectX")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class LibraryTests
|
public class LibraryTests
|
||||||
{
|
{
|
||||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|||||||
using Syroot.Worms.Armageddon.ProjectX;
|
using Syroot.Worms.Armageddon.ProjectX;
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Armageddon.ProjectX
|
namespace Syroot.Worms.Test.Armageddon.ProjectX
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="Scheme"/> class.
|
/// Represents a collection of tests for the <see cref="Scheme"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("ProjectX")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class SchemeTests
|
public class SchemeTests
|
||||||
{
|
{
|
||||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|||||||
using Syroot.Worms.Armageddon;
|
using Syroot.Worms.Armageddon;
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Armageddon
|
namespace Syroot.Worms.Test.Armageddon
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="Scheme"/> class.
|
/// Represents a collection of tests for the <see cref="Scheme"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Armageddon")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class SchemeTests
|
public class SchemeTests
|
||||||
{
|
{
|
||||||
|
@ -2,12 +2,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|||||||
using Syroot.Worms.Armageddon;
|
using Syroot.Worms.Armageddon;
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Armageddon
|
namespace Syroot.Worms.Test.Armageddon
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Armageddon")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class TeamContainerTests
|
public class TeamContainerTests
|
||||||
{
|
{
|
||||||
|
@ -53,9 +53,7 @@ namespace Syroot.Worms.Test.Common
|
|||||||
List<string> gamePaths = GetGamePaths(games);
|
List<string> gamePaths = GetGamePaths(games);
|
||||||
List<string> files = new List<string>();
|
List<string> files = new List<string>();
|
||||||
foreach (string testPath in gamePaths)
|
foreach (string testPath in gamePaths)
|
||||||
{
|
|
||||||
files.AddRange(Directory.GetFiles(testPath, wildcard, SearchOption.AllDirectories));
|
files.AddRange(Directory.GetFiles(testPath, wildcard, SearchOption.AllDirectories));
|
||||||
}
|
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,17 +61,11 @@ namespace Syroot.Worms.Test.Common
|
|||||||
{
|
{
|
||||||
List<string> gamePaths = new List<string>();
|
List<string> gamePaths = new List<string>();
|
||||||
if (game.HasFlag(Game.Worms2))
|
if (game.HasFlag(Game.Worms2))
|
||||||
{
|
|
||||||
gamePaths.AddRange(_gamePathsWorms2);
|
gamePaths.AddRange(_gamePathsWorms2);
|
||||||
}
|
|
||||||
if (game.HasFlag(Game.WormsArmageddon))
|
if (game.HasFlag(Game.WormsArmageddon))
|
||||||
{
|
|
||||||
gamePaths.AddRange(_gamePathsWormsArmageddon);
|
gamePaths.AddRange(_gamePathsWormsArmageddon);
|
||||||
}
|
|
||||||
if (game.HasFlag(Game.WormsWorldParty))
|
if (game.HasFlag(Game.WormsWorldParty))
|
||||||
{
|
|
||||||
gamePaths.AddRange(_gamePathsWormsWorldParty);
|
gamePaths.AddRange(_gamePathsWormsWorldParty);
|
||||||
}
|
|
||||||
return gamePaths;
|
return gamePaths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2
|
namespace Syroot.Worms.Test
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="Img"/> class.
|
/// Represents a collection of tests for the <see cref="Img"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Gen2")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class ImageTests
|
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 Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2
|
namespace Syroot.Worms.Test
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="RiffPalette"/> class.
|
/// Represents a collection of tests for the <see cref="RiffPalette"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Gen2")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class PaletteTests
|
public class PaletteTests
|
||||||
{
|
{
|
||||||
|
@ -3,10 +3,9 @@
|
|||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="1.1.11" />
|
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="1.1.11" />
|
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
|
||||||
<ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
|
<ProjectReference Include="..\Syroot.Worms\Syroot.Worms.csproj" />
|
||||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms.WorldParty;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
using Syroot.Worms.WorldParty;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.WorldParty
|
namespace Syroot.Worms.Test.WorldParty
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("WorldParty")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class LandDataTests
|
public class LandDataTests
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms.WorldParty;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
using Syroot.Worms.WorldParty;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.WorldParty
|
namespace Syroot.Worms.Test.WorldParty
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("WorldParty")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class TeamContainerTests
|
public class TeamContainerTests
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms.Worms2;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
using Syroot.Worms.Worms2;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Worms2
|
namespace Syroot.Worms.Test.Worms2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
/// Represents a collection of tests for the <see cref="LandData"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Worms2")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class LandDataTests
|
public class LandDataTests
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms.Worms2;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
using Syroot.Worms.Worms2;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Worms2
|
namespace Syroot.Worms.Test.Worms2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="SchemeOptions"/> class.
|
/// Represents a collection of tests for the <see cref="SchemeOptions"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Worms2")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class SchemeOptionsTests
|
public class SchemeOptionsTests
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms.Worms2;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
using Syroot.Worms.Worms2;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Worms2
|
namespace Syroot.Worms.Test.Worms2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="SchemeWeapons"/> class.
|
/// Represents a collection of tests for the <see cref="SchemeWeapons"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Worms2")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class SchemeWeaponsTests
|
public class SchemeWeaponsTests
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Syroot.Worms.Worms2;
|
|
||||||
using Syroot.Worms.Test.Common;
|
using Syroot.Worms.Test.Common;
|
||||||
|
using Syroot.Worms.Worms2;
|
||||||
|
|
||||||
namespace Syroot.Worms.Test.Gen2.Worms2
|
namespace Syroot.Worms.Test.Worms2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
/// Represents a collection of tests for the <see cref="TeamContainer"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[TestCategory("Worms2")]
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class TeamContainerTests
|
public class TeamContainerTests
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user