java - Where to keep test-supplementary classes? -


i'm trying create directory structure in maven java project:

pom.xml /src   /main     /java       /com         /xxx           foo.java           bar.java   /test     /java       /com         /xxx           footest.java           bartest.java     /spikes <---- i'm not sure right english word them       /com         /xxx           mockedhttpconnection.java 

thus, in 2 tests footest , bartest can use same mockedhttpconnection, decoupled them both, staying @ same time in same package them. think approach? have feeling i'm reinventing wheel, can't find patterns mechanism in java.

if mockedhttpconnection own class i'd suggest store under /test/java/com/testutil.

if third party class, add jar classpath.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -