Testing .NET Code with xUnit.net 2
Learn how to get started writing .NET tests using the open source xUnit.net 2 testing framework.
What you'll learn
xUnit.net 2 is a modern, extensible, multi-platform testing framework for .NET. Currently being used by the Microsoft ASP.Net 5 development team, xUnit.net allows the creation, execution, and customization of automated tests such as unit, integration, and, when combined with other libraries, even automated UI tests. In this course, you'll learn about the features of xUnit.net 2 and learn how to write and run tests in Visual Studio Test Explorer, ReSharper, and from the command line. You'll learn to write test asserts against different types of objects, including how to assert against floating point values, collections, and how to check that exceptions are thrown when expected. The course also covers how to customize the test execution life cycle and how data driven tests can reduce the amount of test code that needs to be written and help reduce test maintenance costs.
Table of contents
- Introduction 1m
- Design Goals and Features 2m
- Supported Platforms 1m
- Adoption and Usage 1m
- Test Discovery and Essential Attributes 1m
- Running xUnit.net Tests 1m
- NuGet Packages 1m
- Getting Started in Visual Studio 6m
- Running Tests with ReSharper 2m
- Running Tests from the Command Line 4m
- Testing Windows Universal Apps with xUnit.net 5m
- Course Structure 1m
- Summary 1m
- Introduction 2m
- The Assert Test Phase 2m
- Asserting Numeric Test Results 7m
- Asserting String Test Results 6m
- Asserting Null and Boolean Test Results 4m
- Asserting Collection Test Results 8m
- Asserting Test Results Fall within Expected Ranges 3m
- Asserting That Exceptions Are Thrown When Expected 6m
- Asserting on Object Types 6m
- Asserting INotifyPropertyChanged PropertyChanged Events 4m
- Summary 2m
- Introduction 2m
- Grouping Tests into Categories 7m
- Writing Diagnostic Messages to Test Output 4m
- Reusing Test Class Setup and Clean-up Code 6m
- Running Setup and Clean-up Code Once per Test Class 9m
- Sharing Fixture Instances across Multiple Test Classes 6m
- Configuring Parallel Test Execution 5m
- Customizing Collection Execution Order 6m
- Summary 3m
- Introduction 2m
- Overview of Data Driven Tests 2m
- Refactoring Multiple Test Methods to Reduce Duplication 8m
- Sharing Test Data across Test Methods and Classes 7m
- Getting Test Data from External Sources 3m
- Creating Custom Data Source Attributes 3m
- Reducing Test Code with xUnit.net and AutoFixture 2m
- Summary 2m