public void Given_a_dynamic_expression_And_multiline_string_argument_When_invoked_Then_should_execute_evaluation(string argument, string expected) { var runtime = new Mock <IJSRuntime>(); using (dynamic context = new EvalContext(runtime.Object)) { (context as EvalContext).Expression = () => context.alert(argument); } Verify(runtime, $"alert({expected})"); }