Ejemplo n.º 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);
        }
Ejemplo n.º 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]);
        }
Ejemplo n.º 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);
        }