Exemple #1
0
        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);
        }
Exemple #2
0
        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());
        }
Exemple #3
0
        public void CellDatumRequest_ValidateMissingPoint()
        {
            var request = new CellDatumTRexRequest(Guid.NewGuid(), DisplayMode.PassCount, null, null, null, null, 0, null, null);

            Assert.Throws <ServiceException>(() => request.Validate());
        }
Exemple #4
0
        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();
        }