public void UpdateTableName_WithValidDatabasePath_RenamesTableInSpecifiedDatabase() { MainTreeHandler.UpdateTableName("Table", "NewTable", DATABASEPATH1); var result = TreeSearcher.DatabaseHoldsItem <TableFolderItem>(testTree, "NewTable", DATABASEPATH1); Assert.IsTrue(result); }
public void UpdateTableName_WithValidDatabasePath_DatabaseDoesNotContainOldItemAnymore() { MainTreeHandler.UpdateTableName("Table", "NewTable", DATABASEPATH1); var result = TreeSearcher.DatabaseHoldsItem <TableFolderItem>(testTree, "Table", DATABASEPATH1); Assert.IsFalse(result); }
private void RenameTable() { using (var tableHandler = new TableHandler(originalElement.DatabasePath)) { tableHandler.RenameTable(originalElement.DisplayName, NewName); MainTreeHandler.UpdateTableName(originalElement.DisplayName, NewName, originalElement.DatabasePath); } }
public void UpdateTableName_WithInvalidOldName_DoesNotThrowException() { Assert.DoesNotThrow( () => MainTreeHandler.UpdateTableName("InvalidOldName", "NewName", DATABASEPATH1)); }