Наследование: ScriptBlock
Пример #1
0
        public void CanImplicitlyConvertToString()
        {
            var scriptBlock = new TestExecutor("function myFunction() { }");

            String script = scriptBlock;

            Assert.Equal(scriptBlock.ToScriptFragment(), script);
        }
Пример #2
0
        public void WrapScriptBlockWithTestRunnerJavaScript()
        {
            var testExecutor = new TestExecutor("function myFunction() { }");

            Assert.Equal(
              String.Format(ScriptResources.TestExecutorScriptBlockFormat, String.Empty, "function myFunction() { }", String.Empty),
              testExecutor.ToScriptFragment()
            );
        }