proudmonkey / AutoWrapper

A simple, yet customizable global exception handler and Http response wrapper for ASP.NET Core APIs.
MIT License
677 stars 82 forks source link

[FIX] Fix Test Build #58

Closed hueifeng closed 4 years ago

hueifeng commented 4 years ago

@proudmonkey I fixed it in this PR #56

proudmonkey commented 4 years ago

@hueifeng This doesn't solved the issue. You will still get an empty result as the response. For example:

private IEnumerable<PersonResponse> GetMockData()
{
   return new List<PersonResponse>{
          new PersonResponse{
              FirstName = "Vince",
              LastName = "Durano",
          }
    };
}

[HttpGet]
[AutoWrapIgnore]
public IActionResult ActionGet()
{
    var person = GetMockData();
    return Ok(person);
}

In that example, you will see an empty result instead of the expected data as the output.

By the way, I have released a new version of AutoWrapper here that includes a fix for the content-type as well: https://vmsdurano.com/autowrapper-4-2-0-released/

proudmonkey commented 4 years ago

@hueifeng would you be able to look at why the test failed on the last commit?

hueifeng commented 4 years ago

@proudmonkey ok, I will test it.