public Task <ContractExecutionResult> PostCellDatum([FromBody] CellDatumTRexRequest cellDatumRequest) { Log.LogInformation($"{nameof(PostCellDatum)}: {JsonConvert.SerializeObject(cellDatumRequest)}"); cellDatumRequest.Validate(); ValidateFilterMachines(nameof(PostCellDatum), cellDatumRequest.ProjectUid, cellDatumRequest.Filter); var s = WithServiceExceptionTryExecuteAsync(() => RequestExecutorContainer .Build <CellDatumExecutor>(ConfigStore, LoggerFactory, ServiceExceptionHandler) .ProcessAsync(cellDatumRequest)); return(s); }
public void CellDatumRequest_ValidateInvalidDesignUid() { var request = new CellDatumTRexRequest(Guid.NewGuid(), DisplayMode.PassCount, new WGSPoint(123.456, 987.654), new Point(123.456, 987.654), null, Guid.Empty, 0, null, null); Assert.Throws <ServiceException>(() => request.Validate()); }
public void CellDatumRequest_ValidateMissingPoint() { var request = new CellDatumTRexRequest(Guid.NewGuid(), DisplayMode.PassCount, null, null, null, null, 0, null, null); Assert.Throws <ServiceException>(() => request.Validate()); }
public void CellDatumRequest_ValidateSuccess() { var request = new CellDatumTRexRequest(Guid.NewGuid(), DisplayMode.PassCount, null, new Point(123.456, 987.654), null, null, 0, null, null); request.Validate(); }