O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing Test Driven Development in C#

Video Description

Learn how to use TDD in everyday work and write high-quality code

About This Video

  • Learn what unit tests are and how to use them
  • Learn how to add test support to your project and use unit test frameworks
  • Learn what TDD is and how to use it
  • Learn how to write testable code by applying best practices, techniques, and patterns

In Detail

Even after so many years, TDD is still one of the main buzzwords at almost every conference. This technique has proven itself to be one of the best practices out there when it comes to writing maintainable, robust, and testable code. This course covers key concepts, methods, and patterns behind TDD through concrete and practical examples in C# 7.

This course starts off with an introduction to unit tests and unit test frameworks. Basically, you will learn how to write and automate tests for your implementations. After that, we shift the paradigm and see how to write your tests before implementation itself. We explore how to add full test support to our projects, as well. Through practical examples you will witness how this technique helps us write higher-quality code. In the final sections of this course, you will learn proven methods and patterns for writing modular and testable code. The principles of TDD will help you write better and cleaner code. In addition, you’ll see how solid tests give you a new sense of confidence when you need to modify existing code, refactor, and add new features.

By the end of this course, you will have the tools you need to start building bulletproof applications, backed by an automated suite of tests to ensure quality software delivery.

The code bundle for this video course is available at - https://github.com/PacktPublishing/-Introducing-Test-Driven-Development-in-C-

Table of Contents

  1. Chapter 1 : Learn How Your Software Works with Test Automation
    1. The Course Overview 00:03:12
    2. Exploring Test Automation 00:04:02
    3. Types of Automation Tests 00:04:08
    4. Implementing Automation Frameworks in .NET 00:05:16
    5. Automated Testing Demonstration with an Example 00:07:52
  2. Chapter 2 : TDD – The Workflow to Bulletproof Your Code
    1. Understand TDD with an Example 00:07:29
    2. TDD Versus Traditional Testing 00:02:52
    3. Development Cycle of TDD 00:03:16
  3. Chapter 3 : Adding Test Support to a .NET Project
    1. Creating the Test Project in Visual Studio 00:12:14
    2. Creating the Test Project in Visual Studio Code 00:01:09
    3. Using Patterns for Arranging and Formatting Code 00:02:55
    4. Dive into Continuous Testing and Code Coverage 00:08:30
  4. Chapter 4 : The Art of Writing Testable Code
    1. Testable Code and Single Responsibility Principle 00:07:57
    2. Anti-Pattern – Singleton Pattern 00:03:00
    3. Anti-Pattern – The new Operator 00:03:07
    4. Anti-Pattern – Static Methods 00:02:24
  5. Chapter 5 : Testing Modular Code Via Mocking
    1. Introduction to Mocking 00:05:13
    2. Manually Mocking Interfaces 00:07:10
    3. Using Moq Framework 00:08:51
  6. Chapter 6 : Modularizing Code and Inversion of Control
    1. Dependency Inversion Principle and Inversion of Control 00:05:57
    2. Factory Method Design Pattern and Abstract Factory Design Pattern 00:06:19
    3. Using Delegate Types 00:03:27
  7. Chapter 7 : Dependency Injection Pattern – The Holy Grail of Modular Design
    1. Dependency Injection 00:05:56
    2. Dependency Injection Patterns 00:05:04
    3. Dependency Injection Containers 00:08:12
    4. Composition Root 00:03:28
  8. Chapter 8 : Concrete Examples of Common Abstractions
    1. Repository Pattern Introduction 00:05:02
    2. Repository Pattern Implementation 00:12:45
    3. Service Layer 00:03:01