The more information you can have at your fingertips while writing code, the easier it is to keep you mind focused on solving the current puzzles in your application. That’s why Microsoft introduced the Code Lens feature in VS. It’s a tiny info pane that gives you critical information while looking at your code. This video looks at how to enable CodeLens and how it shows the current state of your unit tests.
- [Voiceover] Context is king when it comes to writing…and debugging code.…The more information you can have at your fingertips…while writing code,…the easier it is to keep your mind focused…on solving the current puzzles…in your application.…That's why Microsoft introduced…the CodeLens feature in Visual Studio.…It's a tiny inline infopane…that gives you critical information…about who's referencing the methods in a class,…what is the status for your Source Control check-in,…and what's the current state of your unit tests.…It's available in Visual Studio Professional…and Enterprise editions,…and it's enabled by default.…
I usually turn it off while recording courses.…Here's how to enable it:…Before I enable it,…look at this test method in my test class.…You can see there's nothing between the test method…and the declaration of the method.…Now I'll go enable CodeLens.…Easiest way to find it is go to Search…and look for Lens,…and enable it by clicking on this top check mark.…As you can see there are a lot of different kinds…
- 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.