BrogramoBrogramo
<span class='guest_name pointer' onclick='smpChangeGuestName()'>Guest</span>Guest

CS-320 What to include in Contact.java ContactService.java ContactTest.java and ContactServiceTest.java

This post is a clarification on what to include in the Java files for the course CS-320 Software Testing Automation. The files are: 

  • Contact.java
  • ContactService.java
  • ContactTest.java
  • ContactServiceTest.java

At first, I was not sure why I needed to submit four files, considering that no specific instructions were given on what to include in each one. Later, I realized that I needed to create two packages, one for the application and another for the JUnit tests. I put Contact.java and ContactService.java in the application package I created and ContactTest.java and ContactServiceTest.java in the test package.

The Contact.java file is a class that has the following attributes:

  • ID
  • firstName
  • lastName
  • phoneNumber
  • address

The ContactTest.java file implements Junit methods to test the attributes of the Contact class. 

The ContactService.java file implements a vector to store Contact objects and methods to add, update, and delete Contact objects using the ID attribute.

The ContactServiceTest.java file implements methods to test the add, update, and delete methods in the ContactService class.

Hope that helped.

Be the first to comment on this post.