示例#1
0
        public override void ProcessResponse(JObject response)
        {
            base.ProcessResponse(response);

            var variableProvider = new NodeSetValueVariable(this._stackFrame, this._name, response);

            this.Result = this._resultFactory.Create(variableProvider);
        }
        public void CreateSetVariableValue()
        {
            // Arrange
            JObject      json       = SerializationTestData.GetSetVariableValueResponse();
            const int    frameId    = 3;
            var          stackFrame = new NodeStackFrame(frameId);
            const string name       = "name";

            // Act
            var result = new NodeSetValueVariable(stackFrame, name, json);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(NodePropertyAttributes.None, result.Attributes);
            Assert.IsNull(result.Class);
            Assert.AreEqual(44, result.Id);
            Assert.AreEqual(name, result.Name);
            Assert.IsNull(result.Parent);
            Assert.AreEqual(stackFrame, result.StackFrame);
            Assert.AreEqual("55", result.Text);
            Assert.AreEqual(NodePropertyType.Normal, result.Type);
            Assert.AreEqual("number", result.TypeName);
            Assert.AreEqual("55", result.Value);
        }