Class EMFFormsRendererFactory_Test
- java.lang.Object
-
- org.eclipse.emfforms.internal.swt.core.EMFFormsRendererFactory_Test
-
public class EMFFormsRendererFactory_Test extends java.lang.Object
Test for theEMFFormsRendererFactoryImpl
.- Author:
- Eugen Neufeld
-
-
Constructor Summary
Constructors Constructor Description EMFFormsRendererFactory_Test()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
Setup the EMFFormsRendererFactoryImpl.void
testAddAdditionalRendererService()
void
testAddRendererService()
void
testGetAdditionalRendererInstanceNoFittingServices()
void
testGetRendererInstanceDifferentPrioSameVElement()
void
testGetRendererInstanceNoFittingServices()
void
testGetRendererInstanceNoRendererServices()
void
testGetRendererInstanceSamePrioDifferentVElement()
void
testRemoveAdditionalRendererService()
void
testRemoveRendererService()
-
-
-
Method Detail
-
setUp
public void setUp()
Setup the EMFFormsRendererFactoryImpl.
-
testGetRendererInstanceNoRendererServices
public void testGetRendererInstanceNoRendererServices() throws EMFFormsNoRendererException
Test method forEMFFormsRendererFactory#getRendererInstance(VElement, ViewModelContext)
. When no EMFFormsRendererService is registered then an IllegalStateException should be thrown.- Throws:
EMFFormsNoRendererException
-
testGetRendererInstanceNoFittingServices
public void testGetRendererInstanceNoFittingServices() throws EMFFormsNoRendererException
Test method forEMFFormsRendererFactory#getRendererInstance(VElement, ViewModelContext)
. When no fitting EMFFormsRendererService is available then an IllegalStateException should be thrown.- Throws:
EMFFormsNoRendererException
-
testAddRendererService
public void testAddRendererService() throws EMFFormsNoRendererException
Test method forEMFFormsRendererFactory#getRendererInstance(VElement, ViewModelContext)
. When one EMFFormsRendererService is registered thenEMFFormsRendererService.isApplicable(VElement,ViewModelContext)
is called exactly once.- Throws:
EMFFormsNoRendererException
-
testRemoveRendererService
public void testRemoveRendererService() throws EMFFormsNoRendererException
Test method forEMFFormsRendererFactory#getRendererInstance(VElement, ViewModelContext)
. When the only EMFFormsRendererService is removed then an IllegalStateException is thrown.- Throws:
EMFFormsNoRendererException
-
testGetRendererInstanceSamePrioDifferentVElement
public void testGetRendererInstanceSamePrioDifferentVElement() throws EMFFormsNoRendererException
Test method forEMFFormsRendererFactory#getRendererInstance(VElement, ViewModelContext)
. Check that the EMFFormsRendererService with the fitting VElement is used to get an AbstractSWTRenderer.- Throws:
EMFFormsNoRendererException
-
testGetRendererInstanceDifferentPrioSameVElement
public void testGetRendererInstanceDifferentPrioSameVElement() throws EMFFormsNoRendererException
Test method forEMFFormsRendererFactory#getRendererInstance(VElement, ViewModelContext)
. Check that the EMFFormsRendererService with the higher priority is used to get an AbstractSWTRenderer.- Throws:
EMFFormsNoRendererException
-
testAddAdditionalRendererService
public void testAddAdditionalRendererService()
Test method forEMFFormsRendererFactory#getAdditionalRendererInstances(VElement, ViewModelContext)
. When one EMFFormsRendererService is registered thenEMFFormsAdditionalRendererService.isApplicable(VElement, ViewModelContext)
is called exactly once.
-
testRemoveAdditionalRendererService
public void testRemoveAdditionalRendererService()
-
testGetAdditionalRendererInstanceNoFittingServices
public void testGetAdditionalRendererInstanceNoFittingServices()
Test method forEMFFormsRendererFactory#getAdditionalRendererInstances(VElement, ViewModelContext)
. When no fitting EMFFormsRendererService is available then the collection is empty.
-
-