static void IsNumber(string s, double v, string msg = null) { RuntimeObj o = ScriptEngine.Evaluate(s); Assert.IsInstanceOf <JSEvalNumber>(o); Assert.That(o.ToDouble(), Is.EqualTo(v), msg ?? s); }
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); }