public async Task UXO_GetUXOById_ShouldReturnOk()
        {
            var uxoId = "1";

            var mockUxoService         = new Mock <IUXOService>();
            var mockUxoDocumentService = new Mock <IUXODocumentService>();

            mockUxoService.Setup(svc => svc.FetchUXO(uxoId))
            .ReturnsAsync(SampleData.MinimalUXO());

            var controller = new UxoController(mockUxoService.Object, mockUxoDocumentService.Object, _logger);
            var result     = await controller.GetUXOData(uxoId);

            var actionResult = Assert.IsType <ActionResult <UXO> >(result);
            var objectResult = Assert.IsType <OkObjectResult>(actionResult.Result);

            Assert.IsType <UXO>(objectResult.Value);
        }
        public async Task UXO_GetUXOByInvalidId_ShouldReturnNotFound()
        {
            var uxoId = "1";

            var mockUxoService         = new Mock <IUXOService>();
            var mockUxoDocumentService = new Mock <IUXODocumentService>();

            mockUxoService.Setup(svc => svc.FetchUXO(uxoId))
            .ReturnsAsync((UXO)null);

            var controller = new UxoController(mockUxoService.Object, mockUxoDocumentService.Object, _logger);
            var result     = await controller.GetUXOData(uxoId);

            var actionResult = Assert.IsType <ActionResult <UXO> >(result);
            var objectResult = Assert.IsType <NotFoundObjectResult>(actionResult.Result);

            Assert.IsType <ErrorResponse>(objectResult.Value);
        }
        public async Task UXO_GetUXOByIdHasAnError_ShouldReturnInternalServerError()
        {
            var uxoId = "1";

            var mockUxoService         = new Mock <IUXOService>();
            var mockUxoDocumentService = new Mock <IUXODocumentService>();

            mockUxoService.Setup(svc => svc.FetchUXO(uxoId))
            .ThrowsAsync(new Exception());

            var controller = new UxoController(mockUxoService.Object, mockUxoDocumentService.Object, _logger);
            var result     = await controller.GetUXOData(uxoId);

            var actionResult = Assert.IsType <ActionResult <UXO> >(result);
            var objectResult = Assert.IsType <ObjectResult>(actionResult.Result);

            Assert.Equal((int)HttpStatusCode.InternalServerError, objectResult.StatusCode);
        }