public class MultiReferenceRenderer_PTest extends Object
MultiReferenceSWTRenderer
.Modifier and Type | Class and Description |
---|---|
static interface |
MultiReferenceRenderer_PTest.TestObservableValue
Helper Interface for mocking.
|
Constructor and Description |
---|
MultiReferenceRenderer_PTest() |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.swt.widgets.Table |
createLeaguePlayersTable() |
void |
setUp()
Set up executed before every test.
|
static void |
setUpBeforeClass()
Get
Realm for the tests. |
void |
tearDown()
Unregister databinding and label service after every test.
|
void |
testCreateAndLinkNewButtonTooltip()
Tests the tool-tip on the "Create and link new" button.
|
void |
testCreateAndLinkNewButtonTooltipReflective()
Tests the tool-tip on the "Link" button.
|
void |
testDatabindingServiceUsageAddToModel()
Tests whether adding values to the model is reflected in the control.
|
void |
testDatabindingServiceUsageChangeModel()
Tests whether changing values of the model is reflected in the control.
|
void |
testDatabindingServiceUsageInitialBinding()
Test if the initial data binding is working.
|
void |
testDatabindingServiceUsageRemoveFromModel()
Tests whether removing values to the model is reflected in the control.
|
void |
testEffectivelyReadOnlyDisablesControl()
Test that the control is disabled when it's effectively set to read only because a parent is read only.
|
void |
testLabelServiceUsage()
Tests whether a
EMFFormsLabelProvider is used to get labels. |
void |
testLinkButtonTooltip()
Tests the tool-tip on the "Link" button.
|
void |
testLinkButtonTooltipReflective()
Tests the tool-tip on the "Link" button.
|
void |
testReadOnlyDisablesControl()
Test that the control is disabled when it's set to read only
|
void |
testRenderModeCompactVerticallyGridDescription() |
void |
testRenderModeCompactVerticallyRenderButtons() |
void |
testRenderModeCompactVerticallyRenderTable() |
void |
testRenderModeCompactVerticallyRenderValidation() |
void |
testRenderModeDefaultGridDescription() |
public static void setUpBeforeClass()
Realm
for the tests.public void setUp() throws DatabindingFailedException, NoLabelFoundException
MultiReferenceSWTRenderer
to be tested. Mocks needed parameters and contents (e.g.
VControl, ViewModelContext).DatabindingFailedException
- if the databinding failedNoLabelFoundException
public void tearDown()
public void testDatabindingServiceUsageInitialBinding() throws NoRendererFoundException, NoPropertyDescriptorFoundExeption, DatabindingFailedException
NoRendererFoundException
- Renderer could not be foundNoPropertyDescriptorFoundExeption
- Property descriptor could not be foundDatabindingFailedException
- if the databinding failedpublic void testDatabindingServiceUsageAddToModel() throws NoRendererFoundException, NoPropertyDescriptorFoundExeption, DatabindingFailedException
NoRendererFoundException
- Renderer could not be foundNoPropertyDescriptorFoundExeption
- Property descriptor could not be foundDatabindingFailedException
- if the databinding failedpublic void testDatabindingServiceUsageRemoveFromModel() throws NoRendererFoundException, NoPropertyDescriptorFoundExeption, DatabindingFailedException
NoRendererFoundException
- Renderer could not be foundNoPropertyDescriptorFoundExeption
- Property descriptor could not be foundDatabindingFailedException
- if the databinding failedpublic void testDatabindingServiceUsageChangeModel() throws NoRendererFoundException, NoPropertyDescriptorFoundExeption, DatabindingFailedException
NoRendererFoundException
- Renderer could not be foundNoPropertyDescriptorFoundExeption
- Property descriptor could not be foundDatabindingFailedException
- if the databinding failedpublic void testLabelServiceUsage() throws NoRendererFoundException, NoPropertyDescriptorFoundExeption, DatabindingFailedException
EMFFormsLabelProvider
is used to get labels.NoRendererFoundException
- Renderer could not be foundNoPropertyDescriptorFoundExeption
- Property descriptor could not be foundDatabindingFailedException
- if the databinding failedpublic void testRenderModeDefaultGridDescription()
public void testRenderModeCompactVerticallyGridDescription()
public void testRenderModeCompactVerticallyRenderValidation() throws NoPropertyDescriptorFoundExeption, NoRendererFoundException
public void testRenderModeCompactVerticallyRenderTable() throws NoPropertyDescriptorFoundExeption, NoRendererFoundException, DatabindingFailedException
public void testRenderModeCompactVerticallyRenderButtons() throws NoPropertyDescriptorFoundExeption, NoRendererFoundException, DatabindingFailedException
public void testLinkButtonTooltip()
public void testLinkButtonTooltipReflective()
public void testCreateAndLinkNewButtonTooltip()
public void testCreateAndLinkNewButtonTooltipReflective()
protected org.eclipse.swt.widgets.Table createLeaguePlayersTable()
public void testReadOnlyDisablesControl() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
public void testEffectivelyReadOnlyDisablesControl() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
Copyright © 2018. All rights reserved.