public async Task AddOrderAsyncTest() { AddOrderModel addOrderModel = CreateAddOrderModel(); DefaultResponseModel expected = CreateDefaultResponseModel(); SetupOrderServiceAddAsyncMock(addOrderModel, expected); IActionResult actual = await orderApiController.Add(addOrderModel); DefaultResponseModel actualValue = (DefaultResponseModel)(actual as JsonResult).Value; Assert.AreEqual(actualValue.Message, expected.Message); }