Пример #1
0
        public async Task InitializedOfflineStoreAsync_CallsInit_WhenStore()
        {
            var store  = new MockOfflineStore();
            var client = new DatasyncClient(Endpoint, new DatasyncClientOptions {
                OfflineStore = store
            });

            await client.InitializeOfflineStoreAsync();

            Assert.True(client.SyncContext.IsInitialized);
        }
Пример #2
0
 public async Task InitializeOfflineStoreAsync_Throws_WhenNoStore()
 {
     var client = new DatasyncClient(Endpoint);
     await Assert.ThrowsAsync <InvalidOperationException>(() => client.InitializeOfflineStoreAsync());
 }
        public async Task ToODataString_IncludeDeletedItems_IsWellFormed()
        {
            await client.InitializeOfflineStoreAsync();

            var table = client.GetOfflineTable <IdEntity>("movies");
            var query = table.IncludeDeletedItems() as TableQuery <IdEntity>;
            var odata = query.ToODataString();

            Assert.Equal("__includedeleted=true", odata);
        }