public void GetElevatorStatus_ShouldMapResultProperly() { //Arrange var elevator = _fixture.Create <Elevator>(); _aggregateRepository .Setup(s => s.LoadAsync <Elevator>(It.IsAny <int>())) .Returns(Task.FromResult(elevator)); //Act var results = _sut.GetElevatorStatus(_fixture.Create <int>()).Result; //Assert results.Should().NotBeNull(); results.CurrentFloor.Should().Be(elevator.CurrentFloor); results.Destination.Should().Be(elevator.Destination); results.DoorClosed.Should().Be(elevator.DoorClosed); results.Status.Should().Be(elevator.Status); }
public async Task <ElevatorDto> GetStatus([FromRoute] int id) { return(await _elevatorsApiService.GetElevatorStatus(id)); }