Chapter 6: Unit Testing
Learning Objectives
After completing this chapter, you should be able to do the following:
- Write unit tests to verify the behavior of methods.
- Identify proper behaviors for which a test should be written.
- Know the importance of testing in creating well-functioning code.
- Use test-driven development to define the behavior of code before writing it, and to ensure that code is properly tested.
- Using MSTest to create unit tests.
Key Terminology
As you work through this chapter, you should make note of the terms on the following pages:
Testing in C#
- Automated Testing
- Unit Testing
MSTest
MSTest
- Refactor
- Test-driven Development
- TDD
TestClass
TestMethod
- Attributes
- Dependency
- Test Runner
[TestInitialize]
[TestCleanup]