16 weeks 3 hours ago
Sometimes you need a test class with connection to a data base. We can use JUnit and Spring framework to make it.In my opinion the best way is separate the project and the test. If we work with the test like a normal project, we´ll have source in src/test/java with the java classes (dao, model, services, test, etc), and another source src/test/resources with the configuration files (applicationContext.xml , applicationContext-ibatis.xml). We define our test class with the annotations:@...