示例#1
0
        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);
        }
示例#2
0
        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]);
        }
示例#3
0
        public void Serialize_Works_WithItem()
        {
            var operation = new DeleteOperation("test", "1234")
            {
                Item = testObject
            };

            JObject actual = operation.Serialize();

            actual.Remove("id");

            Assert.Equal(serializedObject, actual);
        }