Web Development

VST13 Better Unit Tests through Design Patterns for ASP MVC, WebAPI, and AngularJS

11/17/2015

4:15pm - 5:30pm

Level: Intermediate to Advanced

Benjamin Day

Consultant & Trainer

Benjamin Day Consulting, Inc.

You're sold on unit testing. You're even doing "test first” development; but there are always nagging questions. How do your user interfaces fit into your testing plan? Do I have to call my database in order to have a good, solid test? What about calls into separate sub-systems or calls out to Web services? Do you really need to have all those pieces running in order to test your logic? What do I do about that app that doesn't have any tests?

Ben will start this session by clarifying the difference between "unit” and "integration” tests. After that, he'll demonstrate how using dependency injection, mock objects and stubs can help break dependencies and simplify your tests. You can expect to hear a lot about design patterns, how much code coverage is enough, and the fine line between too much and too little object mocking. And it won't just be ASP.NET MVC. There'll be WebAPI and AngularJS demos, as well.

You will learn:

  • How to use design patterns to help improve your testability
  • About user interface testability patterns
  • About mocking for ASP.NET, C#, and AngularJS tests