private async Task <object> ProcessRequest() { ThuriaLogger.LogMessage(LogSeverity.Info, "Received Helium Insert Request"); try { var(requestModel, errorResponse) = GetHeliumRequest(); if (errorResponse != null) { return(errorResponse); } var retrieveActor = _heliumActorSystem.ActorSystem.ActorSelection("/user/HeliumInsertAction"); var actionMessage = new HeliumActionMessage(HeliumAction.Insert, requestModel.RequestData); var actionResultMessage = await retrieveActor.Ask <HeliumActionResultMessage>(actionMessage); var heliumResponse = new HeliumResponse { ActionResult = actionResultMessage.HeliumActionResult, ErrorDetail = actionResultMessage.ErrorDetail }; ThuriaLogger.LogMessage(LogSeverity.Info, $"Completed Helium Insert Request [{heliumResponse.ActionResult}]"); return(CreateResponse(Context, HttpStatusCode.OK, heliumResponse)); } catch (Exception runtimeException) { ThuriaLogger.LogMessage(LogSeverity.Exception, $"Exception: {runtimeException}"); throw new InternalServerErrorException("Error occurred processing Helium Insert Action Request", runtimeException); } }
public void Constructor() { //---------------Set up test pack------------------- //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var heliumResponse = new HeliumResponse(); //---------------Test Result ----------------------- heliumResponse.Should().NotBeNull(); }