Esempio n. 1
0
        public void UpdateOperation_UpdateFieldWithObject_String_SameAsUpdateFieldWithString(string inputValue)
        {
            var updateOp1 = new UpdateOperation();

            updateOp1.UpdateFieldWithString("field", inputValue);
            string json1 = updateOp1.ToJson();

            var updateOp2 = new UpdateOperation();

            updateOp2.UpdateFieldWithObject("field", inputValue);
            string json2 = updateOp2.ToJson();

            Assert.AreEqual(json1, json2);
        }
Esempio n. 2
0
        public void UpdateOperation_AddsString_DeserializesCorrectly()
        {
            // Setup
            var updateOp = new UpdateOperation();

            updateOp.UpdateFieldWithString("field1", "str1");

            // System under test
            string resultJson = updateOp.ToJson();

            // Verify
            string expectedJson = "{\"field1\":\"str1\"}";

            Assert.AreEqual(expectedJson, resultJson);
        }
Esempio n. 3
0
 private static void AddUpdateSource(UpdateOperation updateOp) => updateOp.UpdateFieldWithString("updateSource", "bloomHarvester");