Class LinkControlSWTRenderer_CrossReference_PTest
- java.lang.Object
-
- org.eclipse.emfforms.swt.common.test.AbstractControl_PTest<VControl>
-
- org.eclipse.emf.ecp.view.internal.core.swt.renderer.LinkControlSWTRenderer_CrossReference_PTest
-
public class LinkControlSWTRenderer_CrossReference_PTest extends org.eclipse.emfforms.swt.common.test.AbstractControl_PTest<VControl>
Unit tests for theLinkControlSWTRenderer
which use a non-containmentEReference
.- Author:
- Lucas Koehler
-
-
Constructor Summary
Constructors Constructor Description LinkControlSWTRenderer_CrossReference_PTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
before()
void
createAndLinkButton_noReferenceStyleProperty()
By default, the 'create and link new' button should be shown for cross references (legacy behavior).void
createAndLinkButton_referenceStylePropertyFalse()
void
createAndLinkButton_referenceStylePropertyFalse_readOnly()
Test that buttons are still created but invisible when the VControl is set to readonly.void
createAndLinkButton_referenceStylePropertyTrue()
void
linkButton_referenceStyleFalse()
For cross references, the 'link' button must also be shown if the reference style property is set to false.void
linkButton_referenceStyleFalse_readonly()
void
linkExistingButton_noReferenceStyle()
For cross references, the 'link' button must be shown by default (:= reference style == true).protected void
mockControl()
void
tearDown()
-
Methods inherited from class org.eclipse.emfforms.swt.common.test.AbstractControl_PTest
createResource, dispose, getContext, getDatabindingService, getLabelProvider, getRenderer, getShell, getTemplateProvider, getvControl, labelServiceUsage, mockControl, mockDatabindingIsSettableAndChangeable, renderControl, renderLabel, renderValidationIconLabelAlignmentLeft, renderValidationIconLabelAlignmentNone, setContext, setDatabindingService, setLabelProvider, setMockLabelAlignment, setRenderer, setShell, setTemplateProvider, setup, setvControl, testGridDescriptionLabelAlignmentLeft, testGridDescriptionLabelAlignmentNone
-
-
-
-
Method Detail
-
before
public void before() throws DatabindingFailedException, NoLabelFoundException
-
tearDown
public void tearDown()
-
mockControl
protected void mockControl() throws DatabindingFailedException
- Specified by:
mockControl
in classorg.eclipse.emfforms.swt.common.test.AbstractControl_PTest<VControl>
- Throws:
DatabindingFailedException
-
createAndLinkButton_noReferenceStyleProperty
public void createAndLinkButton_noReferenceStyleProperty() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
By default, the 'create and link new' button should be shown for cross references (legacy behavior).
-
createAndLinkButton_referenceStylePropertyTrue
public void createAndLinkButton_referenceStylePropertyTrue() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
-
createAndLinkButton_referenceStylePropertyFalse
public void createAndLinkButton_referenceStylePropertyFalse() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
-
createAndLinkButton_referenceStylePropertyFalse_readOnly
public void createAndLinkButton_referenceStylePropertyFalse_readOnly() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
Test that buttons are still created but invisible when the VControl is set to readonly. This also implicitly tests that no null pointer exception is thrown if not all buttons are rendered.
-
linkExistingButton_noReferenceStyle
public void linkExistingButton_noReferenceStyle() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
For cross references, the 'link' button must be shown by default (:= reference style == true).
-
linkButton_referenceStyleFalse
public void linkButton_referenceStyleFalse() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
For cross references, the 'link' button must also be shown if the reference style property is set to false.
-
linkButton_referenceStyleFalse_readonly
public void linkButton_referenceStyleFalse_readonly() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
-
-