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); }
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); }
private static void AddUpdateSource(UpdateOperation updateOp) => updateOp.UpdateFieldWithString("updateSource", "bloomHarvester");