Hi Michaël!
Here are some ideas for the tests:
1. a fixture "duplicate-geometries.jml" with duplicate geometries.
2. a new test class "DeleteDuplicateGeometriesPlugInTest" copied
from UnionByAttributePlugInTests
3. change parameters to "itemlayer" and "deleteOnlyForSameAttributes"
4. write tests cases for deleteOnlyForSameAttribute set to true and to false
5. first the cases with successful results (bounded context)
6. check (assertion) that a result layer exists after execute and check the
result layer name and the category.
7. check (assertion) for all features that should be kept and should be
deleted
(for example by attribute value). (is there any preference which geometry
is deleted without same attributes? first duplicate geometry in
getFeatures() always kept?)
8. check the status bar message (warn user) or the html windows (if this
plugin
uses them). I think as a best practice we should always send a message to
the status bar
if the execution was successful or failed.
9. check everything in 6, 7 and 8 for failed cases (edge cases).
--Benjamin
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel