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); }
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()); }
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); }
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()); }
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); }
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()); }