public void the_time_of_clock_Moscow_should_be_5_after_the_phone_clock_is_set_to_9_Beijing_time() { //Arrange CityClock moscowClock = new CityClock(4); hotelWorldClockSystem.attach(moscowClock); //Act phoneClock.setHotelWorldClockSystem(hotelWorldClockSystem); phoneClock.setTime(9); //Assert Assert.AreEqual(5, moscowClock.getTime()); }
public void the_time_of_clock_NewYork_should_be_20_after_the_phone_clock_is_set_to_9_Beijing_time() { //Arrange CityClock newYorkClock = new CityClock(-5); hotelWorldClockSystem.attach(newYorkClock); //Act phoneClock.setHotelWorldClockSystem(hotelWorldClockSystem); phoneClock.setTime(9); //Assert Assert.AreEqual(20, newYorkClock.getTime()); }
public void the_time_of_clock_London_should_be_1_after_the_phone_clock_is_set_to_9_Beijing_time() { //Arrange CityClock londonClock = new CityClock(0); hotelWorldClockSystem.attach(londonClock); //Act phoneClock.setHotelWorldClockSystem(hotelWorldClockSystem); phoneClock.setTime(9); //Assert Assert.AreEqual(1, londonClock.getTime()); }
public void the_time_of_clock_London_and_NewYork_should_be_1_and_20_respectively_after_the_phone_clock_is_set_to_9_Beijing_time() { //Arrange CityClock londonClock = new CityClock(0); CityClock newYorkClock = new CityClock(-5); hotelWorldClockSystem.attach(londonClock); hotelWorldClockSystem.attach(newYorkClock); //Act phoneClock.setHotelWorldClockSystem(hotelWorldClockSystem); phoneClock.setTime(9); //Assert Assert.AreEqual(1, londonClock.getTime()); Assert.AreEqual(20, newYorkClock.getTime()); }