In Java, I have seen the practice of having test and source in the same project inside different packages. But now someone asked me to make Java source code as a different project and Take test out of the main project and make it a separate Test project like in .net and give the reference of that source jar in the project.
See Following is the practice in general we follow
But now someone asked me to create a project src>>main>>java>>com>>foo>>Sample.java
as one project and then make Test like a Java project give reference of the above jar into your test project(add that jar into libs or add a dependency into your build file) to execute test cases.
Do you think that is a feasible solution?
Should we follow such kind of practice.?