public void UpdateViewName_WithValidDatabasePath_RenamesViewInSpecifiedDatabase() { MainTreeHandler.UpdateViewName("View", "NewView", DATABASEPATH1); var result = TreeSearcher.DatabaseHoldsItem <ViewFolderItem>(testTree, "NewView", DATABASEPATH1); Assert.IsTrue(result); }
public void UpdateViewName_WithValidDatabasePath_DatabaseDoesNotContainOldItemAnymore() { MainTreeHandler.UpdateViewName("View", "NewView", DATABASEPATH1); var result = TreeSearcher.DatabaseHoldsItem <ViewFolderItem>(testTree, "View", DATABASEPATH1); Assert.IsFalse(result); }
private void RenameView() { using (var viewHandler = new ViewHandler(originalElement.DatabasePath)) { viewHandler.UpdateViewName(originalElement.DisplayName, NewName); MainTreeHandler.UpdateViewName(originalElement.DisplayName, NewName, originalElement.DatabasePath); } }
public void UpdateViewName_WithInvalidOldName_DoesNotThrowException() { Assert.DoesNotThrow( () => MainTreeHandler.UpdateViewName("InvalidOldName", "NewName", DATABASEPATH1)); }