Пример #1
0
        public void AssignEvaluation_AddProperty_AddAtom_ExpectSuccess()
        {
            //------------Setup for test--------------------------
            JObject j = new JObject();

            //------------Execute Test---------------------------
            var obj    = WarewolfDataEvaluationCommon.addAtomicPropertyToJson(j, "Name", DataStorage.WarewolfAtom.NewDataString("a"));
            var result = obj.ToString();

            //------------Assert Results-------------------------
            Assert.AreEqual(@"{
  ""Name"": ""a""
}", result);
        }
Пример #2
0
        public void AssignEvaluation_AddProperty_AddNothing_ExpectSuccess()
        {
            //------------Setup for test--------------------------
            JObject j = new JObject();

            //------------Execute Test---------------------------
            // ReSharper disable once RedundantAssignment
            var obj    = WarewolfDataEvaluationCommon.addAtomicPropertyToJson(j, "Name", DataStorage.WarewolfAtom.Nothing);
            var result = obj.ToString();

            //------------Assert Results-------------------------
            Assert.AreEqual(@"{
  ""Name"": null
}", result);
        }