public async Task Test_CheckDeliveryPointForRange_PositiveScenario() { var expectedresult = await testCandidate.CheckDeliveryPointForRange(addDeliveryPointDTO); Assert.IsNotNull(expectedresult); Assert.IsFalse(expectedresult.HasAllDuplicates); Assert.IsFalse(expectedresult.HasDuplicates); Assert.IsTrue(expectedresult.IsMultiple); }
public async Task <IActionResult> CheckDeliveryPointForRange([FromBody] AddDeliveryPointDTO deliveryPointDto) { try { using (loggingHelper.RMTraceManager.StartTrace("WebService.CheckDeliveryPointForRange")) { CreateDeliveryPointForRangeModelDTO createDeliveryPointForRangeModelDTO = null; string methodName = typeof(DeliveryPointController) + "." + nameof(CheckDeliveryPointForRange); loggingHelper.LogMethodEntry(methodName, priority, entryEventId); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } createDeliveryPointForRangeModelDTO = await businessService.CheckDeliveryPointForRange(deliveryPointDto); loggingHelper.LogMethodExit(methodName, priority, exitEventId); return(Ok(createDeliveryPointForRangeModelDTO)); } } catch (AggregateException ae) { foreach (var exception in ae.InnerExceptions) { loggingHelper.Log(exception, TraceEventType.Error); } var realExceptions = ae.Flatten().InnerException; throw realExceptions; } }