Class LinkControlSWTRenderer_Containment_PTest
- java.lang.Object
-
- org.eclipse.emfforms.swt.common.test.AbstractControl_PTest<VControl>
-
- org.eclipse.emf.ecp.view.internal.core.swt.renderer.LinkControlSWTRenderer_Containment_PTest
-
public class LinkControlSWTRenderer_Containment_PTest extends org.eclipse.emfforms.swt.common.test.AbstractControl_PTest<VControl>
Unit tests for theLinkControlSWTRenderer
which use a containmentEReference
.- Author:
- Lucas Koehler
-
-
Constructor Summary
Constructors Constructor Description LinkControlSWTRenderer_Containment_PTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
before()
void
createAndLinkButton_noReferenceStyle()
void
createAndLinkButton_referenceStyleFalse()
For containment references, the 'create and link new' button must also be shown if the reference style property is set to false.void
linkButton_referenceStyleFalse()
For containment references, the 'link' button must not be shown if the reference style property is set to false.void
linkButton_referenceStyleFalse_readOnly()
Test that buttons are still created but invisible when the VControl is set to readonly.void
linkExistingButton_noReferenceStyle()
For containment references, the 'link' button must be shown by default (:= reference style == true).void
linkExistingButton_noReferenceStyle_readOnly()
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_noReferenceStyle
public void createAndLinkButton_noReferenceStyle() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
-
createAndLinkButton_referenceStyleFalse
public void createAndLinkButton_referenceStyleFalse() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
For containment references, the 'create and link new' button must also be shown if the reference style property is set to false.
-
linkExistingButton_noReferenceStyle
public void linkExistingButton_noReferenceStyle() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
For containment references, the 'link' button must be shown by default (:= reference style == true).
-
linkExistingButton_noReferenceStyle_readOnly
public void linkExistingButton_noReferenceStyle_readOnly() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
-
linkButton_referenceStyleFalse
public void linkButton_referenceStyleFalse() throws DatabindingFailedException, NoRendererFoundException, NoPropertyDescriptorFoundExeption
For containment references, the 'link' button must not be shown if the reference style property is set to false.
-
linkButton_referenceStyleFalse_readOnly
public void linkButton_referenceStyleFalse_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.
-
-