Skip to content

delacruzjl/AutoFixture.AutoMoq.WebApi

Repository files navigation

NuGet Badge License: MIT

AutoFixture.AutoMoq.WebApi

See [http://stackoverflow.com/questions/19908385/automocking-web-api-2-controller] for details.

Usage

Simplifies the use of AutoFixture customization for WebAPI controllers. You won't need to add the Moq customization, ApiControllerConventions already includes that customization.

  private readonly Fixture _fixture;
  
  public YourTestClassConstructor(){
    _fixture = new Fixture();
     _fixture.Customize(new ApiControllerConventions()); //Important!
  }
  ...
  
  //When instantiating your API controller system under test use
  _systemUnderTestAPIController = _fixture.Create<YourApiController>();
  
  

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages