changeset 4001:92d455c3783b

More unit tests for cells.
author jgiles
date Tue, 18 Jun 2013 15:48:28 +1200
parents c879a1c4c77e
children b4f3debd7092
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/resources/ControlResources.java javafx-ui-controls/src/com/sun/javafx/scene/control/skin/resources/EmbeddedResources.java javafx-ui-controls/test/javafx/scene/control/cell/ChoiceBoxTableCellTest.java javafx-ui-controls/test/javafx/scene/control/cell/ChoiceBoxTreeTableCellTest.java javafx-ui-controls/test/javafx/scene/control/cell/ComboBoxTableCellTest.java javafx-ui-controls/test/javafx/scene/control/cell/ComboBoxTreeTableCellTest.java javafx-ui-controls/test/javafx/scene/control/cell/TextFieldTableCellTest.java javafx-ui-controls/test/javafx/scene/control/cell/TextFieldTreeTableCellTest.java
diffstat 8 files changed, 1201 insertions(+), 772 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/resources/ControlResources.java	Tue Jun 18 12:26:41 2013 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/resources/ControlResources.java	Tue Jun 18 15:48:28 2013 +1200
@@ -38,6 +38,10 @@
     // Do not cache the bundle here. It is cached by the ResourceBundle
     // class and may be updated if the default locale changes.
 
+    private ControlResources() {
+        // no-op
+    }
+
     /*
      * Look up a string in the properties file corresponding to the
      * default locale (i.e. the application's locale). If not found, the
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/resources/EmbeddedResources.java	Tue Jun 18 12:26:41 2013 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/resources/EmbeddedResources.java	Tue Jun 18 15:48:28 2013 +1200
@@ -31,6 +31,10 @@
 
     private static ResourceBundle embeddedResourceBundle;
 
+    private EmbeddedResources() {
+        // no-op
+    }
+
     public static ResourceBundle getBundle() {
         if (embeddedResourceBundle == null) {
             embeddedResourceBundle = ResourceBundle.getBundle("com/sun/javafx/scene/control/skin/resources/embedded");
--- a/javafx-ui-controls/test/javafx/scene/control/cell/ChoiceBoxTableCellTest.java	Tue Jun 18 12:26:41 2013 +1200
+++ b/javafx-ui-controls/test/javafx/scene/control/cell/ChoiceBoxTableCellTest.java	Tue Jun 18 15:48:28 2013 +1200
@@ -29,6 +29,7 @@
 import javafx.collections.ObservableList;
 import javafx.scene.control.TableCell;
 import javafx.scene.control.TableColumn;
+import javafx.scene.control.TableView;
 import javafx.util.Callback;
 import javafx.util.StringConverter;
 import org.junit.Before;
@@ -161,6 +162,38 @@
         ChoiceBoxTableCell<Object, Object> cell = new ChoiceBoxTableCell<>(converter);
         assertNull(cell.getGraphic());
     }
+
+
+    /**************************************************************************
+     *
+     * Constructor tests for one-arg (varargs items) constructor
+     *
+     **************************************************************************/
+
+    @Test public void testConstructor_varargs_defaultStringConverterIsNotNull() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ChoiceBoxTableCell<Object, Object> cell = new ChoiceBoxTableCell<>(items);
+        assertNotNull(cell.getConverter());
+    }
+
+    @Test public void testConstructor_varargs_defaultStyleClass() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ChoiceBoxTableCell<Object, Object> cell = new ChoiceBoxTableCell<>(items);
+        assertTrue(cell.getStyleClass().contains("choice-box-table-cell"));
+    }
+
+    @Test public void testConstructor_varargs_defaultGraphicIsACheckBox() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ChoiceBoxTableCell<Object, Object> cell = new ChoiceBoxTableCell<>(items);
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void testConstructor_varargs_itemsListIsNotNullOrEmpty() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ChoiceBoxTableCell<Object, Object> cell = new ChoiceBoxTableCell<>(items);
+        assertNotNull(cell.getItems());
+        assertEquals(3, cell.getItems().size());
+    }
     
     
     /**************************************************************************
@@ -214,131 +247,174 @@
     }
 
 
-//    /**************************************************************************
-//     *
-//     * editing tests
-//     *
-//     **************************************************************************/
-//
-//    // --- is Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsFalse_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(false);
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_listViewIsNull_isEmpty() {
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_cellEditableIsTrue_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    // --- is Not Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsFalse_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(false);
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_listViewIsNull_isNotEmpty() {
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    // --- cancel edit
-//    @Test public void test_cancelEdit() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTableCell<Object> cell = new ChoiceBoxTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//
-//        cell.cancelEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
+    /**************************************************************************
+     *
+     * editing tests
+     *
+     **************************************************************************/
+
+    // --- is Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isEmpty() {
+        TableView tableView = new TableView();
+        tableView.setEditable(false);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateTableView(tableView);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableViewIsNull_isEmpty() {
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_tableViewEditableIsTrue_tableColumnIsNull() {
+        TableView tableView = new TableView();
+        tableView.setEditable(true);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView();
+        tableView.setEditable(true);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_cellEditableIsTrue_isEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView();
+        tableView.setEditable(true);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.setEditable(true);
+        cell.updateTableView(tableView);
+        cell.updateTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    // --- is Not Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
+        ChoiceBoxTableCell<Object, Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isNotEmpty() {
+        TableView tableView = new TableView();
+        tableView.setEditable(false);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateItem("TEST", false);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableViewIsNull_isNotEmpty() {
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isNotEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    // --- cancel edit
+    @Test public void test_cancelEdit_usingCellCancelEdit() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        cell.cancelEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_cancelEdit_usingTableCancelEdit() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ChoiceBoxTableCell<Object,Object> cell = new ChoiceBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        tableView.edit(-1, null);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
 }
--- a/javafx-ui-controls/test/javafx/scene/control/cell/ChoiceBoxTreeTableCellTest.java	Tue Jun 18 12:26:41 2013 +1200
+++ b/javafx-ui-controls/test/javafx/scene/control/cell/ChoiceBoxTreeTableCellTest.java	Tue Jun 18 15:48:28 2013 +1200
@@ -27,8 +27,10 @@
 
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
+import javafx.scene.control.TreeItem;
 import javafx.scene.control.TreeTableCell;
 import javafx.scene.control.TreeTableColumn;
+import javafx.scene.control.TreeTableView;
 import javafx.util.Callback;
 import javafx.util.StringConverter;
 import org.junit.Before;
@@ -161,6 +163,38 @@
         ChoiceBoxTreeTableCell<Object, Object> cell = new ChoiceBoxTreeTableCell<>(converter);
         assertNull(cell.getGraphic());
     }
+
+
+    /**************************************************************************
+     *
+     * Constructor tests for one-arg (varargs items) constructor
+     *
+     **************************************************************************/
+
+    @Test public void testConstructor_varargs_defaultStringConverterIsNotNull() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ChoiceBoxTreeTableCell<Object, Object> cell = new ChoiceBoxTreeTableCell<>(items);
+        assertNotNull(cell.getConverter());
+    }
+
+    @Test public void testConstructor_varargs_defaultStyleClass() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ChoiceBoxTreeTableCell<Object, Object> cell = new ChoiceBoxTreeTableCell<>(items);
+        assertTrue(cell.getStyleClass().contains("choice-box-tree-table-cell"));
+    }
+
+    @Test public void testConstructor_varargs_defaultGraphicIsACheckBox() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ChoiceBoxTreeTableCell<Object, Object> cell = new ChoiceBoxTreeTableCell<>(items);
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void testConstructor_varargs_itemsListIsNotNullOrEmpty() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ChoiceBoxTreeTableCell<Object, Object> cell = new ChoiceBoxTreeTableCell<>(items);
+        assertNotNull(cell.getItems());
+        assertEquals(3, cell.getItems().size());
+    }
     
     
     /**************************************************************************
@@ -214,131 +248,174 @@
     }
 
 
-//    /**************************************************************************
-//     *
-//     * editing tests
-//     *
-//     **************************************************************************/
-//
-//    // --- is Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsFalse_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(false);
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_listViewIsNull_isEmpty() {
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_cellEditableIsTrue_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    // --- is Not Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsFalse_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(false);
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_listViewIsNull_isNotEmpty() {
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    // --- cancel edit
-//    @Test public void test_cancelEdit() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ChoiceBoxTreeTableCell<Object> cell = new ChoiceBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//
-//        cell.cancelEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
+    /**************************************************************************
+     *
+     * editing tests
+     *
+     **************************************************************************/
+
+    // --- is Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isEmpty() {
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(false);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableViewIsNull_isEmpty() {
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_tableViewEditableIsTrue_tableColumnIsNull() {
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(true);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(true);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateTreeTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_cellEditableIsTrue_isEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(true);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.setEditable(true);
+        cell.updateTreeTableView(tableView);
+        cell.updateTreeTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    // --- is Not Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
+        ChoiceBoxTreeTableCell<Object, Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isNotEmpty() {
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(false);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateItem("TEST", false);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableViewIsNull_isNotEmpty() {
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isNotEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    // --- cancel edit
+    @Test public void test_cancelEdit_usingCellCancelEdit() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        cell.cancelEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_cancelEdit_usingTableCancelEdit() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ChoiceBoxTreeTableCell<Object,Object> cell = new ChoiceBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        tableView.edit(-1, null);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
 }
--- a/javafx-ui-controls/test/javafx/scene/control/cell/ComboBoxTableCellTest.java	Tue Jun 18 12:26:41 2013 +1200
+++ b/javafx-ui-controls/test/javafx/scene/control/cell/ComboBoxTableCellTest.java	Tue Jun 18 15:48:28 2013 +1200
@@ -140,11 +140,17 @@
         ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>();
         assertNull(cell.getGraphic());
     }
+
+    @Test public void testConstructor_noArgs_itemsListIsNotNull() {
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>();
+        assertNotNull(cell.getItems());
+        assertTrue(cell.getItems().isEmpty());
+    }
     
     
     /**************************************************************************
      * 
-     * Constructor tests for one-arg constructor
+     * Constructor tests for one-arg (converter, no varargs items) constructor
      * 
      **************************************************************************/
     
@@ -162,6 +168,65 @@
         ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(converter);
         assertNull(cell.getGraphic());
     }
+
+    @Test public void testConstructor_converter_itemsListIsNotNull() {
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(converter);
+        assertNotNull(cell.getItems());
+        assertTrue(cell.getItems().isEmpty());
+    }
+
+    /**************************************************************************
+     *
+     * Constructor tests for one-arg (varargs items) constructor
+     *
+     **************************************************************************/
+
+    @Test public void testConstructor_varargs_defaultStringConverterIsNotNull() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(items);
+        assertNotNull(cell.getConverter());
+    }
+
+    @Test public void testConstructor_varargs_defaultStyleClass() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(items);
+        assertTrue(cell.getStyleClass().contains("combo-box-table-cell"));
+    }
+
+    @Test public void testConstructor_varargs_defaultGraphicIsACheckBox() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(items);
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void testConstructor_varargs_itemsListIsNotNullOrEmpty() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(items);
+        assertNotNull(cell.getItems());
+        assertEquals(3, cell.getItems().size());
+    }
+
+
+    /**************************************************************************
+     *
+     * Property tests
+     *
+     **************************************************************************/
+
+    @Test public void testComboBoxEditable_falseByDefault() {
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>();
+        assertFalse(cell.isComboBoxEditable());
+    }
+
+    @Test public void testComboBoxEditable_setter() {
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>();
+
+        cell.setComboBoxEditable(true);
+        assertTrue(cell.isComboBoxEditable());
+
+        cell.setComboBoxEditable(false);
+        assertFalse(cell.isComboBoxEditable());
+    }
     
     
     /**************************************************************************
@@ -215,131 +280,174 @@
     }
 
 
-//    /**************************************************************************
-//     *
-//     * editing tests
-//     *
-//     **************************************************************************/
-//
-//    // --- is Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsFalse_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(false);
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_listViewIsNull_isEmpty() {
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_cellEditableIsTrue_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    // --- is Not Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsFalse_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(false);
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_listViewIsNull_isNotEmpty() {
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    // --- cancel edit
-//    @Test public void test_cancelEdit() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTableCell<Object> cell = new ComboBoxTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//
-//        cell.cancelEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
+    /**************************************************************************
+     *
+     * editing tests
+     *
+     **************************************************************************/
+
+    // --- is Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isEmpty() {
+        TableView tableView = new TableView();
+        tableView.setEditable(false);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateTableView(tableView);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableViewIsNull_isEmpty() {
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_tableViewEditableIsTrue_tableColumnIsNull() {
+        TableView tableView = new TableView();
+        tableView.setEditable(true);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView();
+        tableView.setEditable(true);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_cellEditableIsTrue_isEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView();
+        tableView.setEditable(true);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.setEditable(true);
+        cell.updateTableView(tableView);
+        cell.updateTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    // --- is Not Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isNotEmpty() {
+        TableView tableView = new TableView();
+        tableView.setEditable(false);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateItem("TEST", false);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableViewIsNull_isNotEmpty() {
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isNotEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    // --- cancel edit
+    @Test public void test_cancelEdit_usingCellCancelEdit() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        cell.cancelEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_cancelEdit_usingTableCancelEdit() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ComboBoxTableCell<Object,Object> cell = new ComboBoxTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        tableView.edit(-1, null);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
 }
--- a/javafx-ui-controls/test/javafx/scene/control/cell/ComboBoxTreeTableCellTest.java	Tue Jun 18 12:26:41 2013 +1200
+++ b/javafx-ui-controls/test/javafx/scene/control/cell/ComboBoxTreeTableCellTest.java	Tue Jun 18 15:48:28 2013 +1200
@@ -27,8 +27,10 @@
 
 import javafx.collections.FXCollections;
 import javafx.collections.ObservableList;
+import javafx.scene.control.TreeItem;
 import javafx.scene.control.TreeTableCell;
 import javafx.scene.control.TreeTableColumn;
+import javafx.scene.control.TreeTableView;
 import javafx.util.Callback;
 import javafx.util.StringConverter;
 import org.junit.Before;
@@ -161,6 +163,60 @@
         ComboBoxTreeTableCell<Object, Object> cell = new ComboBoxTreeTableCell<>(converter);
         assertNull(cell.getGraphic());
     }
+
+
+    /**************************************************************************
+     *
+     * Constructor tests for one-arg (varargs items) constructor
+     *
+     **************************************************************************/
+
+    @Test public void testConstructor_varargs_defaultStringConverterIsNotNull() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(items);
+        assertNotNull(cell.getConverter());
+    }
+
+    @Test public void testConstructor_varargs_defaultStyleClass() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(items);
+        assertTrue(cell.getStyleClass().contains("combo-box-table-cell"));
+    }
+
+    @Test public void testConstructor_varargs_defaultGraphicIsACheckBox() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(items);
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void testConstructor_varargs_itemsListIsNotNullOrEmpty() {
+        Object[] items = new Object[] { "Item 1", "Item 2", "Item 3" };
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>(items);
+        assertNotNull(cell.getItems());
+        assertEquals(3, cell.getItems().size());
+    }
+
+
+    /**************************************************************************
+     *
+     * Property tests
+     *
+     **************************************************************************/
+
+    @Test public void testComboBoxEditable_falseByDefault() {
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>();
+        assertFalse(cell.isComboBoxEditable());
+    }
+
+    @Test public void testComboBoxEditable_setter() {
+        ComboBoxTableCell<Object, Object> cell = new ComboBoxTableCell<>();
+
+        cell.setComboBoxEditable(true);
+        assertTrue(cell.isComboBoxEditable());
+
+        cell.setComboBoxEditable(false);
+        assertFalse(cell.isComboBoxEditable());
+    }
     
     
     /**************************************************************************
@@ -214,131 +270,174 @@
     }
 
 
-//    /**************************************************************************
-//     *
-//     * editing tests
-//     *
-//     **************************************************************************/
-//
-//    // --- is Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsFalse_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(false);
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_listViewIsNull_isEmpty() {
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_cellEditableIsTrue_isEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableView(listView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    // --- is Not Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsFalse_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(false);
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_listViewIsNull_isNotEmpty() {
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_listViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    // --- cancel edit
-//    @Test public void test_cancelEdit() {
-//        TableView listView = new TableView();
-//        listView.setEditable(true);
-//        ComboBoxTreeTableCell<Object> cell = new ComboBoxTreeTableCell<>();
-//        cell.updateTableView(listView);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//
-//        cell.cancelEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
+    /**************************************************************************
+     *
+     * editing tests
+     *
+     **************************************************************************/
+
+    // --- is Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isEmpty() {
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(false);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableViewIsNull_isEmpty() {
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_tableViewEditableIsTrue_tableColumnIsNull() {
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(true);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(true);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateTreeTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_cellEditableIsTrue_isEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(true);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.setEditable(true);
+        cell.updateTreeTableView(tableView);
+        cell.updateTreeTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    // --- is Not Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
+        ComboBoxTreeTableCell<Object, Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isNotEmpty() {
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(false);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateItem("TEST", false);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableViewIsNull_isNotEmpty() {
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isNotEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    // --- cancel edit
+    @Test public void test_cancelEdit_usingCellCancelEdit() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        cell.cancelEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_cancelEdit_usingTableCancelEdit() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        ComboBoxTreeTableCell<Object,Object> cell = new ComboBoxTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        tableView.edit(-1, null);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
 }
--- a/javafx-ui-controls/test/javafx/scene/control/cell/TextFieldTableCellTest.java	Tue Jun 18 12:26:41 2013 +1200
+++ b/javafx-ui-controls/test/javafx/scene/control/cell/TextFieldTableCellTest.java	Tue Jun 18 15:48:28 2013 +1200
@@ -25,6 +25,7 @@
 
 package javafx.scene.control.cell;
 
+import javafx.collections.FXCollections;
 import javafx.scene.control.TableCell;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableView;
@@ -214,131 +215,164 @@
      *
      **************************************************************************/
 
-//    // --- is Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
+    // --- is Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isEmpty() {
+        TableView tableView = new TableView();
+        tableView.setEditable(false);
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateTableView(tableView);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableColumnIsNull_isEmpty() {
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView();
+        tableView.setEditable(true);
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+//    @Test public void test_startEdit_tableColumnEditableIsTrue_cellEditableIsTrue_isEmpty() {
+//        TableColumn tc = new TableColumn();
+//        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+//        tableView.getColumns().add(tc);
+//        tableView.setEditable(true);
 //        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.setEditable(false);
-//        cell.startEdit();
+//        cell.updateTableView(tableView);
+//        cell.updateIndex(0);
+//        cell.updateTableColumn(tc);
+//        cell.setEditable(true);
+//
+//        tableView.edit(0, tc);
 //        assertFalse(cell.isEditing());
 //        assertNull(cell.getGraphic());
 //    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsFalse_isEmpty() {
-//        TableColumn<Object,Object> tableColumn = new TableColumn<>();
-//        tableColumn.setEditable(false);
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.updateTableColumn(tableColumn);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_tableColumnIsNull_isEmpty() {
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsTrue_isEmpty() {
-//        TableColumn<Object,Object> tableColumn = new TableColumn<>();
-//        tableColumn.setEditable(true);
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.updateTableColumn(tableColumn);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsTrue_cellEditableIsTrue_isEmpty() {
-//        TableColumn<Object,Object> tableColumn = new TableColumn<>();
-//        tableColumn.setEditable(true);
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableColumn(tableColumn);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    // --- is Not Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsFalse_isNotEmpty() {
-//        TableColumn<Object,Object> tableColumn = new TableColumn<>();
-//        tableColumn.setEditable(false);
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.updateTableColumn(tableColumn);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_tableColumnIsNull_isNotEmpty() {
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsTrue_isNotEmpty() {
-//        TableColumn<Object,Object> tableColumn = new TableColumn<>();
-//        tableColumn.setEditable(true);
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.updateTableColumn(tableColumn);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
-//        TableColumn<Object,Object> tableColumn = new TableColumn<>();
-//        tableColumn.setEditable(true);
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTableColumn(tableColumn);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    // --- cancel edit
-//    @Test public void test_cancelEdit() {
-//        TableView tableView = new TableView<>();
-//        tableView.setEditable(true);
-//        tableView.getItems().add("TEST");
-//        TableColumn<Object,Object> tableColumn = new TableColumn<>();
-//        tableColumn.setEditable(true);
-//        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
-//        cell.updateTableView(tableView);
-//        cell.updateTableColumn(tableColumn);
-////        cell.updateItem("TEST", false);
-//        cell.updateIndex(0);
-//
-////        cell.startEdit();
-//        tableView.edit(0, tableColumn);
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//
-//        cell.cancelEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
+
+    // --- is Not Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableColumnEditableIsFalse_isNotEmpty() {
+        TableColumn<Object,Object> tableColumn = new TableColumn<>();
+        tableColumn.setEditable(false);
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tableColumn);
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateTableColumn(tableColumn);
+        cell.updateTableView(tableView);
+        cell.updateItem("TEST", false);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableColumnIsNull_isNotEmpty() {
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isNotEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableColumnEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    // --- cancel edit
+    @Test public void test_cancelEdit_usingCellCancelEdit() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        cell.cancelEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_cancelEdit_usingTableCancelEdit() {
+        TableColumn tc = new TableColumn();
+        TableView tableView = new TableView(FXCollections.observableArrayList("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        TextFieldTableCell<Object,Object> cell = new TextFieldTableCell<>();
+        cell.updateTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        tableView.edit(-1, null);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
 }
--- a/javafx-ui-controls/test/javafx/scene/control/cell/TextFieldTreeTableCellTest.java	Tue Jun 18 12:26:41 2013 +1200
+++ b/javafx-ui-controls/test/javafx/scene/control/cell/TextFieldTreeTableCellTest.java	Tue Jun 18 15:48:28 2013 +1200
@@ -25,6 +25,7 @@
 
 package javafx.scene.control.cell;
 
+import javafx.collections.FXCollections;
 import javafx.scene.control.TreeItem;
 import javafx.scene.control.TreeTableCell;
 import javafx.scene.control.TreeTableColumn;
@@ -209,144 +210,170 @@
     }
 
 
-//    /**************************************************************************
-//     *
-//     * editing tests
-//     *
-//     **************************************************************************/
-//
-//    // --- is Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsFalse_isEmpty() {
-//        TreeItem root = new TreeItem("Root");
-//        TreeTableView treeView = new TreeTableView(root);
-//
-//        TreeTableColumn<Object,Object> tableColumn = new TreeTableColumn<>();
-//        tableColumn.setEditable(false);
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.updateTreeTableColumn(tableColumn);
-//        cell.updateTreeTableView(treeView);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_tableColumnIsNull_isEmpty() {
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsTrue_isEmpty() {
-//        TreeTableColumn<Object,Object> tableColumn = new TreeTableColumn<>();
-//        tableColumn.setEditable(true);
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.updateTreeTableColumn(tableColumn);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsTrue_cellEditableIsTrue_isEmpty() {
-//        TreeTableColumn<Object,Object> tableColumn = new TreeTableColumn<>();
-//        tableColumn.setEditable(true);
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.setEditable(true);
-//        cell.updateTreeTableColumn(tableColumn);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    // --- is Not Empty
-//    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(false);
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_tableColumnEditableIsFalse_isNotEmpty() {
-//        TreeItem root = new TreeItem("Root");
-//        TreeTableView treeView = new TreeTableView(root);
-//
-//        TreeTableColumn<Object,Object> tableColumn = new TreeTableColumn<>();
-//        tableColumn.setEditable(false);
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.updateTreeTableView(treeView);
-//        cell.updateTreeTableColumn(tableColumn);
-//        cell.updateItem("TEST", false);
-//
-//        cell.startEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
-//
-//    @Test(expected = NullPointerException.class)
-//    public void test_startEdit_cellEditableIsTrue_tableColumnIsNull_isNotEmpty() {
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.updateItem("TEST", false);
-//        cell.setEditable(true);
-//        cell.startEdit();
-//    }
-//
-//    @Test public void test_startEdit_treeViewEditableIsTrue_isNotEmpty() {
-//        TreeItem root = new TreeItem("Root");
-//        TreeTableView treeView = new TreeTableView(root);
-//        treeView.setEditable(true);
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.updateTreeTableView(treeView);
-//        cell.updateIndex(0);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    @Test public void test_startEdit_treeViewEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
-//        TreeItem root = new TreeItem("Root");
-//        TreeTableView treeView = new TreeTableView(root);
-//        treeView.setEditable(true);
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.updateTreeTableView(treeView);
-//        cell.setEditable(true);
-//        cell.updateIndex(0);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//    }
-//
-//    // --- cancel edit
-//    @Test public void test_cancelEdit() {
-//        TreeItem root = new TreeItem("Root");
-//        TreeTableView treeView = new TreeTableView(root);
-//        treeView.setEditable(true);
-//        TreeTableColumn col = new TreeTableColumn();
-//        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
-//        cell.updateTreeTableView(treeView);
-//        cell.updateTreeTableColumn(col);
-//        cell.updateIndex(0);
-//
-//        cell.startEdit();
-//        assertTrue(cell.isEditing());
-//        assertNotNull(cell.getGraphic());
-//
-//        cell.cancelEdit();
-//        assertFalse(cell.isEditing());
-//        assertNull(cell.getGraphic());
-//    }
+    /**************************************************************************
+     *
+     * editing tests
+     *
+     **************************************************************************/
+
+    // --- is Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isEmpty() {
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsFalse_isEmpty() {
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(false);
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableColumnIsNull_isEmpty() {
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView();
+        tableView.setEditable(true);
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateTreeTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    //    @Test public void test_startEdit_tableColumnEditableIsTrue_cellEditableIsTrue_isEmpty() {
+    //        TreeTableColumn tc = new TreeTableColumn();
+    //        TreeTableView tableView = new TreeTableView(FXCollections.observableArrayList("TEST"));
+    //        tableView.getColumns().add(tc);
+    //        tableView.setEditable(true);
+    //        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+    //        cell.updateTreeTableView(tableView);
+    //        cell.updateIndex(0);
+    //        cell.updateTreeTableColumn(tc);
+    //        cell.setEditable(true);
+    //
+    //        tableView.edit(0, tc);
+    //        assertFalse(cell.isEditing());
+    //        assertNull(cell.getGraphic());
+    //    }
+
+    // --- is Not Empty
+    @Test public void test_startEdit_cellEditableIsFalse_isNotEmpty() {
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(false);
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableColumnEditableIsFalse_isNotEmpty() {
+        TreeTableColumn<Object,Object> tableColumn = new TreeTableColumn<>();
+        tableColumn.setEditable(false);
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tableColumn);
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateTreeTableColumn(tableColumn);
+        cell.updateTreeTableView(tableView);
+        cell.updateItem("TEST", false);
+
+        cell.startEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test(expected = NullPointerException.class)
+    public void test_startEdit_cellEditableIsTrue_tableColumnIsNull_isNotEmpty() {
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateItem("TEST", false);
+        cell.setEditable(true);
+        cell.startEdit();
+    }
+
+    @Test public void test_startEdit_tableViewEditableIsTrue_isNotEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    @Test public void test_startEdit_tableColumnEditableIsTrue_cellEditableIsTrue_isNotEmpty() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+    }
+
+    // --- cancel edit
+    @Test public void test_cancelEdit_usingCellCancelEdit() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        cell.cancelEdit();
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
+
+    @Test public void test_cancelEdit_usingTableCancelEdit() {
+        TreeTableColumn tc = new TreeTableColumn();
+        TreeTableView tableView = new TreeTableView(new TreeItem("TEST"));
+        tableView.getColumns().add(tc);
+        tableView.setEditable(true);
+        TextFieldTreeTableCell<Object,Object> cell = new TextFieldTreeTableCell<>();
+        cell.updateTreeTableView(tableView);
+        cell.updateIndex(0);
+        cell.updateTreeTableColumn(tc);
+        cell.setEditable(true);
+
+        tableView.edit(0, tc);
+        assertTrue(cell.isEditing());
+        assertNotNull(cell.getGraphic());
+
+        tableView.edit(-1, null);
+        assertFalse(cell.isEditing());
+        assertNull(cell.getGraphic());
+    }
 }