public async Task <IActionResult> GetApproxLocation(string postcode) { if (postcode == null) { throw new ArgumentNullException(nameof(postcode)); } string methodName = typeof(UnitManagerController) + "." + nameof(GetApproxLocation); using (loggingHelper.RMTraceManager.StartTrace("WebService.GetApproxLocation")) { loggingHelper.LogMethodEntry(methodName, LoggerTraceConstants.UnitManagerAPIPriority, LoggerTraceConstants.UnitManagerControllerMethodEntryEventId); var location = await unitLocationBusinessService.GetApproxLocation(postcode, CurrentUserUnit); DBGeometryDTO geometryData = new DBGeometryDTO { Geometry = location }; loggingHelper.LogMethodEntry(methodName, LoggerTraceConstants.UnitManagerAPIPriority, LoggerTraceConstants.UnitManagerControllerMethodEntryEventId); return(Ok(geometryData)); } }
public void Test_GetApproxLocation() { var result = testCandidate.GetApproxLocation("123", Guid.NewGuid()); Assert.NotNull(result.Result); }