Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }