Esempio n. 1
0
        public void Assign_ValueToJsonProperty()
        {
            //------------Setup for test--------------------------
            var data = CreateEnvironmentWithData();

            //------------Execute Test---------------------------
            AssignEvaluation.evalAssignWithFrame(new AssignValue("[[@Person.Name]]", "dora"), 0, data);

            //------------Assert Results-------------------------
            var jsonObject = data.JsonObjects["Person"];

            Assert.IsNotNull(jsonObject);
            var value = jsonObject.First;
            var token = ((Newtonsoft.Json.Linq.JProperty)value).Value;

            Assert.AreEqual("dora", token);
        }