public void ExecuteRawJavaScript_NullOrEmptyScript_ThrowsArgumentNullException( [Values(null, "")] string script) { Action action = () => Taconite.Execute(script); action.ShouldThrow <ArgumentNullException>(); }
public void ExecuteJavaScriptResult() { var javaScriptResult = new JavaScriptResult(); var result = Taconite.Execute(javaScriptResult); result.Commands.Should().HaveCount(1); var command = result.Commands.Single(); command.As <EvalCommand>() .Should().NotBeNull() .ShouldHave().SharedProperties().EqualTo(new { Script = (string)null, JavaScriptResult = javaScriptResult }); }
public void ExecuteRawJavaScript() { var script = "console.log('hi');"; var result = Taconite.Execute(script); result.Commands.Should().HaveCount(1); var command = result.Commands.Single(); command.As <EvalCommand>() .Should().NotBeNull() .ShouldHave().SharedProperties().EqualTo(new { Script = script, JavaScriptResult = (JavaScriptResult)null }); }
public TaconiteResult ExecuteJavaScript() { return(Taconite.Execute("alert('Hello!');")); }
public void ExecuteJavaScriptResult_NullJavaScriptResult_ThrowsArgumentNullException() { Action action = () => Taconite.Execute((JavaScriptResult)null); action.ShouldThrow <ArgumentNullException>(); }