public async Task <IActionResult> ByAuditId(int customerId, int?auditId) { var dto = await _query.Execute(customerId, auditId); var results = CreateCustomerResult(dto); return(Ok(results)); }
public void TestGetCustomerByIdQuery() { GetCustomerByIdQuery query = new GetCustomerByIdQuery { SearchInput = GetCustomerByIdQuery.Criteria.SearchById(2) }; IList <Customer> resultsById = query.Execute(); Customer matchById = resultsById.First(); Assert.AreEqual("2", matchById.Number); Assert.AreEqual("Jane Doe", matchById.Name); }