static void IsNumber(string s, double v, string msg = null) { RuntimeObj o = ScriptEngine.Evaluate(s); o.Should().BeOfType <DoubleObj>(); o.ToDouble().Should().Be(v, msg ?? s); }
static void IsString(string s, string v, string msg = null) { RuntimeObj o = ScriptEngine.Evaluate(s); o.Should().BeOfType <StringObj>(); o.ToString().Should().Be(v, msg ?? s); }
static void IsBoolean(string s, bool v = true, string msg = null) { RuntimeObj o = ScriptEngine.Evaluate(s); o.Should().BeOfType <BooleanObj>(); o.ToBoolean().Should().Be(v, msg ?? s); }