June 2018
Intermediate to advanced
596 pages
12h 39m
English
To understand how to write unit tests, let's take the JDBC version of the Course Management application that we developed in Chapter 4, Creating JEE Database Applications. 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() ...Read now
Unlock full access