예제 #1
0
        public virtual void SettingAndGettingVariableWithUndefinedValueIsCorrect()
        {
            // Arrange
            const string variableName = "myVar1";
            object       input        = Undefined.Value;

            // Act
            _jsEngine.SetVariableValue(variableName, input);
            bool variableExists = _jsEngine.HasVariable(variableName);
            var  output         = _jsEngine.GetVariableValue(variableName);

            // Assert
            Assert.IsFalse(variableExists);
            Assert.AreEqual(input, output);
        }
예제 #2
0
 public bool HasVariable(string variableName)
 {
     CheckDisposed();
     return(_engine.HasVariable(variableName));
 }
예제 #3
0
 private bool AreScriptsLoaded(IJsEngine engine)
 {
     return(engine.HasVariable(ScriptsAreLoaded));
 }