public void Given_a_dynamic_expression_And_settings_Then_should_execute_evaluation(string replacing, bool disabled, string expected) { var runtime = new Mock <IJSRuntime>(); var settings = new EvalContextSettings { SpaceCharacterPlaceholder = replacing, DisableSpaceCharacterPlaceholderReplacement = disabled }; using (dynamic context = new EvalContext(runtime.Object, settings)) { dynamic arg = new EvalContext(runtime.Object, settings); //alt+166 (context as EvalContext).Expression = () => context.var___instance = arg.new__object(); } Verify(runtime, expected); }