Build a simple PhoneBook program.

PhoneBookTest.java 435B

1234567891011121314151617181920
  1. import static org.junit.Assert.*;
  2. import org.junit.Test;
  3. import java.util.ArrayList;
  4. public class PhoneBookTest
  5. {
  6. @Test
  7. public void addEntryTest(){
  8. PhoneBook newEntry = new PhoneBook();
  9. newEntry.addEntry("Rachelle","123-4567");
  10. Entry actual = newEntry.getEntry("Rachelle");
  11. assertEquals("123-4567",actual.getPhoneNumber());
  12. }
  13. @Test
  14. public void hasEntryTest(){
  15. }
  16. }