0345 4506120

Test Driven Development for C# Developers

This is a course for developers, designed to bring about a fundamental change to the way developers go about their day-to-day business of writing software code. Instead of thinking about unit tests as at best an afterthought, having already written the application code, the course aims to turn this practice on its head, and get programmers to write tests before the code to be tested.

Originating in the Agile methodology of Extreme Programming, Test Driven Development (TDD) has become accepted as a mainstream best practice, and is being adopted by major organisations as a means of improving code quality and developer productivity. Because Test Driven Development involves such a major inversion of most developers' ways of thinking and working, the course is strongly exercise based . Typically developers find TDD initially strange, but go on to find it quite liberating, and become 'test infected' (unable to write code without having first devised unit tests.) The exercises are based on the C# programming language using Visual Studio, MSTest, NUnit2,Nunit3, Xunit,  NCrunch, Moq, Fluent Assertions and Specflow. All of these operating in a client-only GIT environment.

Reset

Learning Objectives

At the end of this course you will have:

  •   The ability to take the TDD approach to software development
  •   An understanding of the key techniques and strategies of TDD, and principles of refactoring code
  •   The ability to write unit tests in MSTest, NUnit2, Nunit3, Xunit
  •   Understand the async and parallel capabilities of these unit testing frameworks
  •   To understand the benefits that NCrunch offers
  •   The ability to use mock objects in unit tests
  •   Work with Specflow to produce automated Acceptance Tests
  •   Track down bugs quickly

Pre-Requisites

Competence in C#

Course Content

The traditional approach : Test-Last

Software Control

  •   Introduce enough GIT (client) to allow local s/w control throughout the course

Introduction to Unit Test (2 chapters)

  •   MSTest, Nunit, NCrunch, Fluent Assertions.
  •   For the introduction we use NCrunch which effectively hides the underlying unit test framework.

Data-Driven unit tests

  •   How this is achieved in MSTest, Nunit2, Nunit3 and Xunit

Mocking

  •   Using Moq

Technology Specifics

  •   Advice on fitting unit test philosophy into Code Contracts, WinForms, WebForms, WPF, MVC, Entity Framework

Specflow

  •   Moving beyond Unit Test into automated Acceptance Tests using Specflow

Privacy Notice

In order to provide you with the service requested we will need to retain and use your contact information in accordance with our Privacy Notice. If you choose to provide us with this information you explicitly consent to us using the information as necessary to provide the request service to you. If you do not agree please do not proceed to request the service from us.

Marketing Permissions

Would you like to receive our newsletter and other information on products and services which we think will be of interest to you by email. We will always treat your information with care and in accordance with our Privacy Notice. You are free to withdraw this permission at any time.

 

Online Courses

You may prefer an online course if you are looking for a flexible and cost-effective solution. Online courses allow you to study at your own pace, at a time that suits you.

We have the following eLearning options available:

Virtual Classroom

Virtual classrooms provide all the benefits of attending a classroom course without the need to arrange travel and accomodation. Please note that virtual courses are attended in real-time, commencing on a specified date.

Virtual Course Dates

Our Customers Include