コード例 #1
0
        public void MultiselectDesicions_IsEnsuredOnlyDirectoriesAreNowSelectableByMultiselectTrue_ReturnsTrue()
        {
            SelectionConfiguration          selectionConfiguration          = new SelectionConfiguration();
            SelectedExplorerTreeItemHandler selectedExplorerTreeItemHandler = new SelectedExplorerTreeItemHandler(selectionConfiguration);
            DirectorySelectionHandler       directorySelectionHandler       = new DirectorySelectionHandler(selectedExplorerTreeItemHandler, selectionConfiguration);
            DirectoryItemViewModel          directoryItemVM = new DirectoryItemViewModel();

            bool result = directorySelectionHandler.MultiselectDesicions(true, directoryItemVM);

            Assert.AreEqual(true, result);
        }
コード例 #2
0
        public void MultiselectDesicions_IsEnsuredOnlyDirectoriesAreNowSelectableByMultiselectTrue_DirectoryVMIsInListSelectedDirectories()
        {
            SelectionConfiguration          selectionConfiguration          = new SelectionConfiguration();
            SelectedExplorerTreeItemHandler selectedExplorerTreeItemHandler = new SelectedExplorerTreeItemHandler(selectionConfiguration);
            DirectorySelectionHandler       directorySelectionHandler       = new DirectorySelectionHandler(selectedExplorerTreeItemHandler, selectionConfiguration);
            DirectoryItemViewModel          directoryItemVM = new DirectoryItemViewModel();

            directorySelectionHandler.MultiselectDesicions(true, directoryItemVM);

            Assert.AreEqual(directoryItemVM, selectedExplorerTreeItemHandler.SelectedDirectories.First());
        }
コード例 #3
0
        public void MultiselectDesicions_IsEnsuredOnlyDirectoriesAreNowSelectableByMultiselectFalseBecauseFileWasSelectedFirst_ReturnsFalse()
        {
            SelectionConfiguration          selectionConfiguration          = new SelectionConfiguration();
            SelectedExplorerTreeItemHandler selectedExplorerTreeItemHandler = new SelectedExplorerTreeItemHandler(selectionConfiguration);

            selectedExplorerTreeItemHandler.SelectedFiles.Add(new FileItemViewModel());
            DirectorySelectionHandler directorySelectionHandler = new DirectorySelectionHandler(selectedExplorerTreeItemHandler, selectionConfiguration);
            DirectoryItemViewModel    directoryItemVM           = new DirectoryItemViewModel();

            bool result = directorySelectionHandler.MultiselectDesicions(true, directoryItemVM);

            Assert.AreEqual(false, result);
        }
コード例 #4
0
        public void MultiselectDesicions__IsMultiselectCombinationDirectoriesAndFilesAllowedTrue_AndIsEnsuredOnlyDirectoriesAndFilesAreNowSelectableByMultiselectTrue__DirectoryVMIsInListSelectedDirectories()
        {
            SelectionConfiguration selectionConfiguration = new SelectionConfiguration();

            selectionConfiguration.IsMultiselectCombinationDirectoriesAndFilesAllowed = true;

            SelectedExplorerTreeItemHandler selectedExplorerTreeItemHandler = new SelectedExplorerTreeItemHandler(selectionConfiguration);
            DirectorySelectionHandler       directorySelectionHandler       = new DirectorySelectionHandler(selectedExplorerTreeItemHandler, selectionConfiguration);
            DirectoryItemViewModel          directoryItemVM = new DirectoryItemViewModel();


            bool result = directorySelectionHandler.MultiselectDesicions(true, directoryItemVM);

            Assert.AreEqual(directoryItemVM, selectedExplorerTreeItemHandler.SelectedDirectories.First());
        }
コード例 #5
0
        public void MultiselectDesicions_IsMultiselectCombinationAllTypesAllowedTrue_ReturnsTrue()
        {
            SelectionConfiguration selectionConfiguration = new SelectionConfiguration();

            selectionConfiguration.IsMultiselectCombinationAllTypesAllowed = true;

            SelectedExplorerTreeItemHandler selectedExplorerTreeItemHandler = new SelectedExplorerTreeItemHandler(selectionConfiguration);
            DirectorySelectionHandler       directorySelectionHandler       = new DirectorySelectionHandler(selectedExplorerTreeItemHandler, selectionConfiguration);
            DirectoryItemViewModel          directoryItemVM = new DirectoryItemViewModel();


            bool result = directorySelectionHandler.MultiselectDesicions(true, directoryItemVM);

            Assert.AreEqual(true, result);
        }
コード例 #6
0
        public void MultiselectDesicions_IsMultiselectCombinationAllTypesAllowedTrue_DirectoryVMIsInListSelectedExplorerTreeItems()
        {
            SelectionConfiguration selectionConfiguration = new SelectionConfiguration();

            selectionConfiguration.IsMultiselectCombinationAllTypesAllowed = true;

            SelectedExplorerTreeItemHandler selectedExplorerTreeItemHandler = new SelectedExplorerTreeItemHandler(selectionConfiguration);
            DirectorySelectionHandler       directorySelectionHandler       = new DirectorySelectionHandler(selectedExplorerTreeItemHandler, selectionConfiguration);
            DirectoryItemViewModel          directoryItemVM = new DirectoryItemViewModel();


            directorySelectionHandler.MultiselectDesicions(true, directoryItemVM);

            Assert.AreEqual(directoryItemVM, selectedExplorerTreeItemHandler.SelectedExplorerTreeItems.First());
        }