On Wed, May 30, 2012 at 3:06 PM, Jody Garnett <[email protected]> wrote:
> There is an evil suggestion here:
> - http://stackoverflow.com/questions/5564804/junit-test-on-urlconnection-use-easymock
>
> It amounts - to making a very small web server in a separate thread that is
> able to serve out your "mock".

Yeah, I was aware of this approach but the implementations of it I've
seen so far involve
starting a embedded Jetty or Grizzly container and are both rather
heavy handed to
be used inside a test.

However following on that thread you mentioned there is this very
little http server
that apparently can do the job in a very straightforward way:
http://mvnrepository.com/artifact/org.simpleframework/simple

http://www.simpleframework.org/doc/tutorial/tutorial.php

I'll just have to pay attention to testing over different possible
ports to avoid
having the test fail on a busy tcp port and the trick is done.
Thanks!

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
mob:    +39 339 8844549

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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to