Rhino.Drivers.JsTestsBase.RunJsTests C# (CSharp) Method

RunJsTests() public method

public RunJsTests ( FilePath tests ) : void
tests Sharpen.FilePath
return void
		public virtual void RunJsTests(FilePath[] tests)
		{
			ContextFactory factory = ContextFactory.GetGlobal();
			Context cx = factory.EnterContext();
			try
			{
				cx.SetOptimizationLevel(this.optimizationLevel);
				Scriptable shared = cx.InitStandardObjects();
				foreach (FilePath f in tests)
				{
					int length = (int)f.Length();
					// don't worry about very long
					// files
					char[] buf = new char[length];
					new FileReader(f).Read(buf, 0, length);
					string session = new string(buf);
					RunJsTest(cx, shared, f.GetName(), session);
				}
			}
			finally
			{
				Context.Exit();
			}
		}
	}