dimanche 27 novembre 2016

JUnit cannot find ApplicationContext

So was using a tutorial here http://ift.tt/2g9eKMO and I keep getting an error when I run as a JUnit test saying it can't find application context. The test class:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/testApplicationContext.xml")
public class CarTest {

is this and I tried putting the testapplicationcontext.xml in like every folder so far. It used to be

 @ContextConfiguration(locations={"/testApplicationContext.xml"}) but I thought if I change it, it might fix it.

Any suggestions?

Aucun commentaire:

Enregistrer un commentaire