[
https://jira.jboss.org/jira/browse/JBIDE-6261?page=com.atlassian.jira.plu...
]
Yahor Radtsevich resolved JBIDE-6261.
-------------------------------------
Resolution: Done
Test is created: org.jboss.tools.jsf.vpe.jsf.test.jbide.DnD_JBIDE5042Test .
As a temporary solution, jMock library is used (because Hibernate Tools already use it).
IMO, a better mock library should support such operations as replacing static
initialization, mocking static methods and constructors. jMockit and PowerMock (it
provides additional operations for Mockito and EasyMock) libraries support some of these
operations, but at the present time I am unable to run them with OSGI container. As I
understand this, these libraries suppose to be run with standard java class loader, but
not OSGI classloader.
Also I have good impressions with using Mockito. It requires less coding and the code
seems more clear than with jMock (see mockito.DnD_JBIDE5042Test.java in attachments).
Review available mock libraries for Java and try to create JUnits for
DnD in VPE
--------------------------------------------------------------------------------
Key: JBIDE-6261
URL:
https://jira.jboss.org/jira/browse/JBIDE-6261
Project: Tools (JBoss Tools)
Issue Type: Task
Components: Visual Page Editor core
Reporter: Yahor Radtsevich
Assignee: Yahor Radtsevich
Fix For: 3.2.next
Currently, it is not possible test DnD functionality using real mouse events. Probably it
could be resolved using a mock library (PowerMock, jMock, EasyMock, Mockito, jMockit or
thomething else).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira