Use Spring for JUnit testing


I have a java application and need to write up some Junit test cases.
My team wants to play around with the Spring framework.

Can not figure out if this can be doable without changing any code.
Of course we can create new classes but I am not sure if this is appropriate.

The java application does't use the Spring framework but wants to the use the Springframework for JUnit testing.

What do you think?.
Who is Participating?
sweetfa2Connect With a Mentor Commented:
Sounds like overkill to me.  The idea of JUnit is to create tests that test a single piece of functionality.  There is little point in bringing spring in just to do unit testing.
girionisConnect With a Mentor Commented:
Why do you want to use Spring to do JUnit? Are there any particular requirements? It's like you want to use a spaceship to travel from your house to your neighbour's house.
dkim18Author Commented:
I think I will just create one example using one dao by showing how to inject one of dao classes into that example class.
I am still not sure what exactly you want to achieve.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.