On Mon, Apr 25, 2011 at 8:51 AM, Gabriel Roldán <groldan@anonymised.com> wrote:
Hey all,
I would need to merge a couple patches to the GWC module, that will
result in fixing the cite build failures.
But before doing that I wanted to ask whether there's any inconvenient
in adding a new _test_ scoped dependency over the Moskito library
<http://mockito.org/>\.
It's a 1.4MB jar that I've been using to extend the test coverage for
the gwc module and that's much more pleasant to work with than EasyMock.
Humm... why not, it's just a one time download...
yet that leaves us with two ways to do mock tests around.
Do you have some time to tell us how Mockito is better than EasyMock?
Also, mock testing did not get much traction in the codebase due to
its fragility
and effort to set it up, is Mockito going to be better in this respect?
In case we would like to migrate everything to Mockito, would it be hard (as in,
is there a straight migration path?)
A quick search shows that mocking is mostly used in the authorization subsystem
testing (my fault :-p):
find . -name "*.java" -exec grep -l -H EasyMock {} \; | sort
./community/geoxacml/src/test/java/org/geoserver/xacml/geoxacml/GeoXACMLGeometryTest.java
./community/geoxacml/src/test/java/org/geoserver/xacml/geoxacml/XACMLURLMatchingTest.java
./community/gss/src/test/java/org/geoserver/gss/SynchronizationManagerTest.java
./community/gss/src/test/java/org/geoserver/gss/xml/GSSXMLTestSupport.java
./community/monitoring/src/test/java/org/geoserver/monitor/ows/MonitorCallbackTest.java
./community/python/src/test/java/org/geoserver/python/PythonCatalogDataTest.java
./community/python/src/test/java/org/geoserver/python/PythonCatalogModTest.java
./extension/wfsv/src/test/java/org/geoserver/wfsv/security/ReadOnlyVersioningDataStoreTest.java
./extension/wfsv/src/test/java/org/geoserver/wfsv/security/ReadOnlyVersioningFeatureStoreTest.java
./main/src/test/java/org/geoserver/feature/retype/FullyRetypingDataStoreTest.java
./main/src/test/java/org/geoserver/feature/retype/RetypingDataStoreTest.java
./main/src/test/java/org/geoserver/security/decorators/ReadOnlyDataAccessTest.java
./main/src/test/java/org/geoserver/security/decorators/ReadOnlyDataStoreTest.java
./main/src/test/java/org/geoserver/security/decorators/SecuredFeatureCollectionTest.java
./main/src/test/java/org/geoserver/security/decorators/SecuredFeatureSourceTest.java
./main/src/test/java/org/geoserver/security/impl/AbstractAuthorizationTest.java
./main/src/test/java/org/geoserver/security/impl/DataAccessRuleDAOTest.java
./main/src/test/java/org/geoserver/security/impl/DefaultDataAccessManagerTreeTest.java
./main/src/test/java/org/geoserver/security/impl/SecureCatalogImplTest.java
./platform/src/test/java/org/geoserver/platform/GeoServerExtensionsTest.java
./wms/src/test/java/org/geoserver/wms/wms_1_1_1/GetFeatureInfoRestrictedTest.java
./wms/src/test/java/org/geoserver/wms/WMSExtensionsTest.java
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------