Now that the unit test project is returning multiple results the Test Runner app need refactoring. This tutorial shows how to use a WPF DataGrid and data-binding to show the multiple test results.
- [Voiceover] I'll re-factor the TestRunner,…to run multiple unit tests and…show the results in the UI.…Since this is a WPF application,…I'll use a data grid for the UI,…then I can bind the grid to a data source,…and it'll automatically show the content…in the grid.…In my Zammil - I have a regular grid,…this is a layout grid - what I'd like to do is…put the data grid in the second row in the grid.…That puts it in the correct row,…and then the next step is to setup the binding.…
I do that by setting the Item Source property.…Now I've got a binding setup.…When the data binding agent sees there's data…in the data source, it'll populate the data grid…with that information.…The next step of course it to create the…collection of data, and I'll do that in the C#…Code Behind file.…To hold the data, I'll use the observable collection class.…This is a popular class in WPF data binding,…because it understands when items are added or removed…from the collection, and the data binding agent…can then update the UI.…
Recall my variable '_results',…
- Examining types of frameworks
- Choosing a naming convention
- Creating unit tests
- Running unit tests with Visual Studio
- Modifying and correcting code
- Handling exceptions
- Installing and using nUnit
- Viewing test results with CodeLens
Skill Level Beginner
Q: This course was updated on 08/22/2017. What changed?
A: New videos were added that cover live unit testing and creating a project with the unit test framework.
1. Create a Simple Unit Test Framework
2. Unit Testing Conventions
Choose a naming convention5m 59s
3. Work with Visual Studio Unit Testing Framework
4. Work with xUnit
5. Work with nUnit
6. Additional Topics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.