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