Skip to content

flarocca/OwinTestServerDemo

Repository files navigation

Unit-Testing ApiController with Owin TestServer

This demo tries to demostrate how we can start writing tests for .Net ApiController by usin Owin TestServer class, even in scenarios where strong dependencies exist and business logic was written in Controller's actions.

This demo is also meant to ilustrate how to test ApiController as they were running in a web server, which enables us to test things such as Filters and responses.

You will see:

  • How to start doing Integration Tests
    • This is the closest writeable test to QA tests
  • How to start using Dependency Injection
    • By taking advantage of Autofac
    • By moving the business logic to a "Service" layer
  • How to mock Filters

Moreover, you will find some design recommendations and patterns

Tools and Libraries:

About

This demo shows how to unit-test controllers using Owin Test Server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published