ASP.NET Core Unit Testing
- 1. Build Robust Web Apps in the Real World
@shahedC
WakeUpAndCode.com
* aka ASP.NET 5 before RC1
- 19. public test class [Fact] for public methods without parameters
[Theory] and [InlineData] for methods with parameters
- 28. In Startup: Add namespace and dependencies
In Application Code:
• Constructor Injection
• Setter Injection
- 31. Mocks
Pre-programmed with expected results, doesn’t
actually connect to DB, behavior verification.
Fakes
Working examples, but not production-ready
(e..g in-memory database)
Stubs
Provides canned answers
http://martinfowler.com/articles/mocksArentStubs.html
Editor's Notes
- Title Page: Automated Testing in ASP .NET Core* 1.0
Build Robust Web Apps in the Real World
* aka ASP.NET 5 before RC1
By Shahed Chowdhuri
Senior Technical Evangelist @ Microsoft
Blog: WakeUpAndCode.com
Twitter: @shahedC
- Agenda
- Introduction
- Introduction
- Introduction
- Introduction
- Introduction
- Agenda
- Contact
Microsoft email: shchowd@microsoft.com
Personal Twitter: @shahedC
Dev Blog: WakeUpAndCode.com