public void Serialize_Works_WithoutItem() { var operation = new DeleteOperation("test", "1234"); serializedObject["item"] = null; // We aren't expecting this. JObject actual = operation.Serialize(); actual.Remove("id"); Assert.Equal(serializedObject, actual); }
public async Task PushItemsAsync_HandlesEmptyQueue_SingleTable() { await table.ServiceClient.InitializeOfflineStoreAsync(); var op = new DeleteOperation("test", "abc123"); store.Upsert(SystemTables.OperationsQueue, new[] { op.Serialize() }); await table.PushItemsAsync(); Assert.Single(store.TableMap[SystemTables.OperationsQueue]); }
public void Serialize_Works_WithItem() { var operation = new DeleteOperation("test", "1234") { Item = testObject }; JObject actual = operation.Serialize(); actual.Remove("id"); Assert.Equal(serializedObject, actual); }