O'Reilly logo

Java EE Development with Eclipse - Second Edition by Ram Kulkarni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and executing unit tests using Eclipse EE

We will take the JDBC version of the course management application that we developed in Chapter 4, Creating a JEE Database Application, because it is simple to understand. Let's start with a simple test case for validating a course. The following is the source code of Course.java:

package packt.book.jee.eclipse.ch5.bean; import java.sql.SQLException; import java.util.List; import packt.book.jee.eclipse.ch5.dao.CourseDAO; public class Course { private int id; private String name; private int credits; private Teacher teacher; private int teacherId; private CourseDAO courseDAO = new CourseDAO(); public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required