public void Should_get_one(ThingQuery.GetById request)
        {
            //  Arrange
            request.Id = "my-first";

            //  Act
            var result = _mediator.SendAsync(request).Result;

            //  Assert
            result.Id.ShouldEqual(request.Id);
        }
        public async Task <IHttpActionResult> Get([FromUri] ThingQuery.GetById input)
        {
            try
            {
                var result = await _mediator.SendAsync(input);

                return(Ok(result));
            }
            catch (EntityNotFound)
            {
                return(NotFound());
            }
        }
        public void Should_throw_ex_when_id_not_exists(ThingQuery.GetById request)
        {
            try
            {
                //  Arrange

                //  Act
                _mediator.SendAsync(request).Wait();
            }
            catch (AggregateException ex)
            {
                //  Assert
                ex.InnerException.ShouldBeType(typeof(EntityNotFound));
                return;
            }

            throw new AssertException();
        }