001package edu.pdx.cs.joy.apptbook;
002
003import org.junit.jupiter.api.Test;
004
005import static org.hamcrest.CoreMatchers.*;
006import static org.hamcrest.MatcherAssert.assertThat;
007import static org.junit.jupiter.api.Assertions.assertThrows;
008
009/**
010 * Unit tests for the {@link Appointment} class.
011 *
012 * You'll need to update these unit tests as you build out your program.
013 */
014public class AppointmentTest {
015
016  /**
017   * This unit test will need to be modified (likely deleted) as you implement
018   * your project.
019   */
020  @Test
021  void getBeginTimeStringNeedsToBeImplemented() {
022    Appointment appointment = new Appointment();
023    assertThrows(UnsupportedOperationException.class, appointment::getBeginTimeString);
024  }
025
026  /**
027   * This unit test will need to be modified (likely deleted) as you implement
028   * your project.
029   */
030  @Test
031  void initiallyAllAppointmentsHaveTheSameDescription() {
032    Appointment appointment = new Appointment();
033    assertThat(appointment.getDescription(), containsString("not implemented"));
034  }
035
036  @Test
037  void forProject1ItIsOkayIfGetBeginTimeReturnsNull() {
038    Appointment appointment = new Appointment();
039    assertThat(appointment.getBeginTime(), is(nullValue()));
040  }
041
042}