Last active
March 11, 2018 02:54
-
-
Save dhaval201279/dab401703dce102596c2b6e81df06402 to your computer and use it in GitHub Desktop.
1st version of ReservationServiceTest - which fails initially
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.its.reservation; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import org.junit.Test; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import com.its.reservation.repository.Reservation; | |
import com.its.reservation.service.ReservationService; | |
@RunWith(MockitoJUnitRunner.class) | |
public class ReservationServiceTest { | |
ReservationService reservationservice; | |
@Before | |
public void setUp() throws Exception { | |
reservationService = new ReservationService(); | |
} | |
@Test | |
public void getReservationDetails_returnsReservationInfo() { | |
Reservation aReservation = reservationservice.getReservationDetails("Dhaval"); | |
assertThat(aReservation.getFirstName()).isEqualTo("Dhaval"); | |
assertThat(aReservation.getFirstName()).isEqualTo("Shah"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment