public async Task <RentalPropertyViewModel> Get(long id)
        {
            var request = new GetRentalPropertyByIdRequest(id);

            var response = await this.mediator.Send(request).ConfigureAwait(false);

            return(new RentalPropertyViewModel(response.RentalProperty));
        }
        public async Task GetRentalPropertyByIdHandlerShouldHandleGetPropertyByIdRequest()
        {
            // arrange
            var repository = Substitute.For <IGetRentalPropertyByIdRepository>();

            repository.GetRentalPropertyById(Arg.Is(RentalPropertyObjectMother.BuildingA.Id)).Returns(RentalPropertyObjectMother.BuildingA);
            var handler = new GetRentalPropertyByIdHandler(repository);
            var request = new GetRentalPropertyByIdRequest(RentalPropertyObjectMother.BuildingA.Id);

            // act
            var response = await handler.Handle(request, CancellationToken.None).ConfigureAwait(false);

            // assert
            response.Should().NotBeNull();
            response.RentalProperty.Id.Should().Be(RentalPropertyObjectMother.BuildingA.Id);
            response.RentalProperty.Name.Should().BeEquivalentTo(RentalPropertyObjectMother.BuildingA.Name);
        }