using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Systin.Library;
using System.Reflection;
using System.IO;
namespace Systin.Library.UnitTests{
[TestFixture]
public class SystinEngineUnitTest
{
private List<Type> mAssemblyTypes;
private Assembly ClassAssembly;
private static string LanguageLibraryName = "LanguageLibrary.dll";
[Test]
[Category("Integration")]
[ExpectedException(typeof(TargetInvocationException))]
[Ignore("Need to get it working correctly")]
public void SystinEngineStart()
{
setup();
Queue<Instruction> instructions = new Queue<Instruction>();
instructions.Enqueue(Instruction.NewInstruction("Log_Into_system"));
DllLoader driver = DllLoader.LoadDll(new FileInfo(this.ClassAssembly.Location));
SystinEngine.ExecuteTestFile(instructions, ref driver);
Assert.IsTrue(driver.LanguageDriverClassManager.InstructionStack.Count == 1);
}
private void setup()
{
//Gets the languageDriverClass dll assembly
Assembly assembly = Util.GetAssemblyPathRelativeToCurrentAssembly(LanguageLibraryName, ref this.mAssemblyTypes);
this.ClassAssembly = assembly;
}
}
}
|