use of org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture in project nebula.widgets.nattable by eclipse.
the class ConfigurableCellBorderTest method setUp.
@Before
public void setUp() throws Exception {
this.natTable = new NatTableFixture();
this.configRegistry = (ConfigRegistry) this.natTable.getConfigRegistry();
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture in project nebula.widgets.nattable by eclipse.
the class TextRenderingTest method setUp.
@Before
public void setUp() throws Exception {
this.natTable = new NatTableFixture();
this.configRegistry = (ConfigRegistry) this.natTable.getConfigRegistry();
this.cellPainter = new TextPainter();
this.gc = new GC(Display.getDefault());
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture in project nebula.widgets.nattable by eclipse.
the class PersistenceHelperTest method testDeleteState.
@Test
public void testDeleteState() {
Properties properties = new Properties();
NatTable natTable = new NatTableFixture();
natTable.saveState("", properties);
natTable.saveState("Blubb", properties);
natTable.saveState("Temp", properties);
Collection<String> stateNames = PersistenceHelper.getAvailableStates(properties);
assertTrue("Resulting state name collection does not contain the empty default state", stateNames.contains(""));
assertTrue("Resulting state name collection does not contain the 'Blubb' state", stateNames.contains("Blubb"));
assertTrue("Resulting state name collection does not contain the 'Temp' state", stateNames.contains("Temp"));
PersistenceHelper.deleteState("Blubb", properties);
stateNames = PersistenceHelper.getAvailableStates(properties);
assertTrue("Resulting state name collection does not contain the empty default state", stateNames.contains(""));
assertFalse("Resulting state name collection does not contain the 'Blubb' state", stateNames.contains("Blubb"));
assertTrue("Resulting state name collection does not contain the 'Temp' state", stateNames.contains("Temp"));
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture in project nebula.widgets.nattable by eclipse.
the class PersistenceHelperTest method testDeleteStateOnEmptyState.
@Test
public void testDeleteStateOnEmptyState() {
Properties properties = new Properties();
NatTable natTable = new NatTableFixture();
natTable.saveState("", properties);
natTable.saveState("Blubb", properties);
natTable.saveState("Temp", properties);
Collection<String> stateNames = PersistenceHelper.getAvailableStates(properties);
assertTrue("Resulting state name collection does not contain the empty default state", stateNames.contains(""));
assertTrue("Resulting state name collection does not contain the 'Blubb' state", stateNames.contains("Blubb"));
assertTrue("Resulting state name collection does not contain the 'Temp' state", stateNames.contains("Temp"));
PersistenceHelper.deleteState("", properties);
// no impact
stateNames = PersistenceHelper.getAvailableStates(properties);
assertFalse("Resulting state name collection does not contain the empty default state", stateNames.contains(""));
assertTrue("Resulting state name collection does not contain the 'Blubb' state", stateNames.contains("Blubb"));
assertTrue("Resulting state name collection does not contain the 'Temp' state", stateNames.contains("Temp"));
}
use of org.eclipse.nebula.widgets.nattable.test.fixture.NatTableFixture in project nebula.widgets.nattable by eclipse.
the class PersistenceHelperTest method testDeleteStateOnEmptyProperties.
@Test
public void testDeleteStateOnEmptyProperties() {
Properties properties = new Properties();
NatTable natTable = new NatTableFixture();
natTable.saveState("", properties);
natTable.saveState("Blubb", properties);
natTable.saveState("Temp", properties);
Collection<String> stateNames = PersistenceHelper.getAvailableStates(properties);
assertTrue("Resulting state name collection does not contain the empty default state", stateNames.contains(""));
assertTrue("Resulting state name collection does not contain the 'Blubb' state", stateNames.contains("Blubb"));
assertTrue("Resulting state name collection does not contain the 'Temp' state", stateNames.contains("Temp"));
PersistenceHelper.deleteState("Blubb", new Properties());
// no impact
stateNames = PersistenceHelper.getAvailableStates(properties);
assertTrue("Resulting state name collection does not contain the empty default state", stateNames.contains(""));
assertTrue("Resulting state name collection does not contain the 'Blubb' state", stateNames.contains("Blubb"));
assertTrue("Resulting state name collection does not contain the 'Temp' state", stateNames.contains("Temp"));
}
Aggregations