wabbajack/Wabbajack.Test/CompilationStackTests.cs
2019-12-07 00:40:29 -06:00

29 lines
840 B
C#

using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.Lib.CompilationSteps;
namespace Wabbajack.Test
{
[TestClass]
public class CompilationStackTests : ACompilerTest
{
[TestMethod]
public async Task TestStackSerialization()
{
var profile = utils.AddProfile();
var mod = utils.AddMod("test");
utils.Configure();
var compiler = await 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());
}
}
}