Пример #1
0
        private static async Task VerifyRemoteHierarchySaving(bool storeLocally)
        {
            RemoteHierarchy h = GetRemoteHierarchy();
            await RemoteSaving.SaveRemotes(h, true, false);

            await VerifyCanLoadRemoteItems(h, storeLocally);

            var h2 = h.CloneLazinatorTyped();

            await VerifyCanLoadRemoteItems(h2, storeLocally);
        }
Пример #2
0
        private static async Task VerifyCanLoadRemoteItems(RemoteHierarchy h, bool remoteItemsStoredLocally)
        {
            h.TopOfHierarchyInt.Should().Be(-1);
            h.RemoteLevel1Item.StoreLocally.Should().Be(remoteItemsStoredLocally);
            var level1Item = await h.RemoteLevel1Item.GetValue();

            level1Item.RemoteLevel1Int.Should().Be(1);
            level1Item.RemoteLevel2Item.StoreLocally.Should().Be(remoteItemsStoredLocally);
            var level2Item = await level1Item.RemoteLevel2Item.GetValue();

            level2Item.RemoteLevel2Int.Should().Be(2);
        }