public void Should_display_dock_information( ) { DockDisplayDTO dto = ObjectMother.DockDisplayDTO( ); int dockId = 2; using (mockery.Record( )) { SetupResult.For(mockRequest.ParsePayloadFor(PayloadKeys.DockId)).Return(dockId); SetupResult.For(mockTask.GetDockInformationBy(dockId)).Return(dto); mockView.Display(dto); } using (mockery.Playback( )) { CreateSUT( ).Initialize( ); } }
public void Should_leverage_mapper_to_return_dto() { long dockId = 1; IDock dock = _mockery.DynamicMock <IDock>( ); DockDisplayDTO dto = ObjectMother.DockDisplayDTO( ); using (_mockery.Record( )) { SetupResult.For(_dockRepository.FindBy(dockId)).Return(dock); Expect.Call(_dockMapper.MapFrom(dock)).Return(dto); } using (_mockery.Playback( )) { Assert.AreEqual(dto, CreateSUT( ).GetDockInformationBy(dockId)); } }
public void Display(DockDisplayDTO dto) { DTO = dto; }