Exemplo n.º 1
0
        public void RefreshLoadsAllFolders(int foldersCount)
        {
            var repo = Fake.Repo<SyncableFolderInfo>(foldersCount);
            var sut = new FoldersTabVM(repo, null);

            sut.Refresh();
            sut.MainList.Count.MustBe(foldersCount, "Folders count");
        }
Exemplo n.º 2
0
        public void StateBeforeRefresh()
        {
            var repo = Fake.Repo<SyncableFolderInfo>(3);
            var sut = new FoldersTabVM(repo, null);

            sut.MainList.Count.MustBe(0, "Folder count");
            //todo: re-test all .SelectedItem
            //sut.MainList.SelectedItems.Count().MustBe(0, "Selected items");
            //sut.MainList.SelectedIndex.MustBe(-1, "Selected index");
        }
Exemplo n.º 3
0
        public void SucceedingRefreshRestoresSelection(FoldersTabVM sut)
        {
            sut.Refresh();
            var f = sut.MainList;

            //f.SelectedIndex = 2;
            sut.Refresh();

            f[2].IsSelected.MustBe(true, "IsSelected");
            //f.SelectedIndex.MustBe(2, "SelectedIndex");
            //f.SelectedItems.Count().MustBe(1, "Selected items");

            //f.SelectedIndex = 5;
            sut.Refresh();

            f[5].IsSelected.MustBe(true, "IsSelected");
            //f.SelectedIndex.MustBe(5, "SelectedIndex");
            //f.SelectedItems.Count().MustBe(1, "Selected items");
        }