mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
28 lines
798 B
C#
28 lines
798 B
C#
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using Wabbajack.Lib.CompilationSteps;
|
|
|
|
namespace Wabbajack.Test
|
|
{
|
|
[TestClass]
|
|
public class CompilationStackTests : ACompilerTest
|
|
{
|
|
[TestMethod]
|
|
public void TestStackSerialization()
|
|
{
|
|
var profile = utils.AddProfile();
|
|
var mod = utils.AddMod("test");
|
|
|
|
utils.Configure();
|
|
var compiler = ConfigureAndRunCompiler(profile);
|
|
var stack = compiler.MakeStack();
|
|
|
|
var serialized = Serialization.Serialize(stack);
|
|
var rounded = Serialization.Serialize(Serialization.Deserialize(serialized, compiler));
|
|
|
|
Assert.AreEqual(serialized, rounded);
|
|
|
|
Assert.IsNotNull(compiler.GetStack());
|
|
}
|
|
}
|
|
}
|