Learn Unit Testing with NUnit and C

Learn unit testing, TDD, mocking and Dependency Injection: techniques that you’ll need to build reliable software.
Learn Unit Testing with NUnit and C
File Size :
2.92 GB
Total length :
7h 39m

Category

Instructor

Engineer Spock

Language

Last update

Last updated 7/2020

Ratings

4.5/5

Learn Unit Testing with NUnit and C

What you’ll learn

Write Unit Tests
Run and Debug Unit Tests
Write Manual Mocks
Write Mocks with Mocking Framework
Practice Test-Driven Development (TDD)
Apply Best Practices of Writing Unit Tests

Learn Unit Testing with NUnit and C

Requirements

You should already be familiar with the basics of C#

Description

Learn deeply the concepts and tools that you will need to build maintainable and reliable software.Teaching ApproachNo fluff, no ranting, no beating the air. I respect your time. The course material is succinct, yet comprehensive. All important concepts are covered. Particularly important topics are covered in-depth.Take this course, and you will be satisfied.   Build a solid foundation in Unit Testing with this course   This course is all about writing effective unit tests using C# programming language and NUnit as a unit testing framework. Along the way, we will learn the concepts related to unit testing. Today unit testing is an absolutely required skill from any professional developer. Companies expect from developers to know how to write unit tests including all the most important topics such as mocking and test driven development (TDD in short). This course does not cover all the features of NUnit. This course is way more interesting.   Learning unit testing puts a powerful and very useful tool at your fingertips. Being familiar with unit testing you can write reliable and maintainable applications. It is very hard to lead a project which is not covered by unit tests.   Content and Overview   This course is primarily aimed at beginner developers. It provides solid theoretical base reinforced by tons of practical material.   We start with basics of unit testing. What is a unit test? What unit testing frameworks exist? How to run and debug unit tests. After getting acquainted with the basics, we will get to the NUnit framework. Here you’ll learn how to install the framework, set the runner. Then you’ll learn the basics of assertions and arrange-act-assert triplet. Other key features of NUnit are also covered:   Running tests from the console   Setup and teardown unit tests   Parameterized tests   Grouping and ignoring   Practicing writing of unit tests, it’s impossible to avoid applying mocks. I like the word “test double” more, in general. By the way, you’ll learn what the difference between the following notion is:   Test double   Fake   Dummy   Stub   Mock   You’ll learn how to write test doubles manually. You will also see a simple example of how to use a mocking framework for using mocks. I’ll use NSubstitute mocking framework for demonstration.   At the end of this section, you’ll get acquainted with two key approaches to unit testing, Classic or Detroit School and London School of unit testing.   You’ll separately learn the basic of test-driven development. It is hard to imagine a modern professional developer who doesn’t know about TDD, so you’ll learn what it is and what it is about. You’ll see the Red-Green-Refactor triplet in action.   I could not complete the course avoiding the best practices of writing unit tests. You’ll learn the basic concepts of the modern approach to unit testing called “pragmatic unit testing”. You’ll see what problems static classes and singletons bring regarding the unit testing. They make code harder to unit test. After that, you’ll learn the problem of extracting interfaces just for the sake of introducing shims for injecting dependencies.   You’ll know should you write unit tests for the trivial code. You’ll learn a lot more in the course.   So, in short, the course covers the following topics:   Basic notions of Unit Testing   NUnit and its features   Test Doubles including fakes, dummies, stubs, spies and mocks   How to write manual test doubles and how to use a mocking framework  (NSubstitute)TDD, red-green-refactor triplet   A great number of best practices of writing unit tests   Introduction to Dependency InjectionIn the end, we will recap what you have learned, and you will try to understand where you have to go further with the intention to master your skills.    How long is this course: The course is around 7.5 hours. All are video lectures. You will be able to download all the slides and code samples used in the course.         ————————————————————Keywords related to the course:Visual Studio unit testing tutorialNUnit unit testing tutorialDot Net testing frameworkC# unit test frameworkVisual Studio unit testing framework tutorialcsharp unit testing tutorial   TDD in C#NSubstituteTDDTest Driven Developmentunit testing C#

Overview

Section 1: Before taking the Course

Lecture 1 How to Ask Questions

Lecture 2 Download Source Code and Slides

Lecture 3 English Subtitles

Lecture 4 Join .NET Community of Students

Section 2: Getting Started

Lecture 5 Outline

Lecture 6 What is a Unit Test?

Lecture 7 Unit-Testing Frameworks

Lecture 8 Your First Unit Test

Lecture 9 Naming Conventions

Lecture 10 Running and Debugging Unit Tests

Lecture 11 Benefits of Unit Testing

Lecture 12 Who Should Write Unit Tests and When

Lecture 13 Programmer’s Oath

Lecture 14 Exercise: Degree Converter

Lecture 15 Solution: Degree Converter

Lecture 16 Conclusion

Section 3: NUnit Framework

Lecture 17 Outline

Lecture 18 Assert Introduction

Lecture 19 Assert Demo

Lecture 20 Arrange-Act-Assert

Lecture 21 Running Tests from the Console

Lecture 22 SetUp and TearDown

Lecture 23 OneTimeSetUp and OneTimeTearDown

Lecture 24 Parameterized Unit Tests

Lecture 25 Grouping and Ignoring Unit Tests

Lecture 26 Code Coverage

Lecture 27 Exercise: FizzBuzz

Lecture 28 Solution: FizzBuzz

Lecture 29 Exercise: Roman Numerals

Lecture 30 Solution: Roman Numerals

Lecture 31 Exercise: Stack

Lecture 32 Solution: Stack

Lecture 33 Conclusion

Section 4: Test Doubles

Lecture 34 Test Doubles and Dependency Injection

Lecture 35 Outline

Lecture 36 Demo of a Testing Problem

Lecture 37 Refactoring to Make Code Testable

Lecture 38 Test Doubles

Lecture 39 Hand Rolled or Manual Test Doubles

Lecture 40 Problems with Manual Test Doubles

Lecture 41 Mocking Frameworks

Lecture 42 Writing Unit Tests with a Mocking Framework

Lecture 43 NSubstitute Mocking Framework. Key Features. Demo

Lecture 44 Detroit School vs London School of Unit Testing

Lecture 45 Conclusion

Section 5: Test-Driven Development

Lecture 46 Outline

Lecture 47 What is TDD?

Lecture 48 Red \ Green \ Refactor

Lecture 49 TDD and Design Upfront

Lecture 50 Regular Agile Process in 200 Words

Lecture 51 VS and R# Shortcuts

Lecture 52 Refactoring Commands Built-In VS 2017

Lecture 53 Fibonacci Numbers

Lecture 54 Three Main TDD Techniques

Lecture 55 Grabbing the Gold

Lecture 56 FizzBuzz

Lecture 57 Reading Roman Numerals

Lecture 58 UpdateableSpin

Lecture 59 Continuous Testing

Lecture 60 Tic-Tac-Toe (Crosses and Noughts)

Lecture 61 Assert First

Lecture 62 TDD Demo – Game in Sticks

Lecture 63 Conclusion

Section 6: Best Practices of Unit Testing

Lecture 64 Outline

Lecture 65 Do Unit Tests Guarantee the Success?

Lecture 66 Pragmatic Unit Testing

Lecture 67 Integration Tests

Lecture 68 Singletons and Static Classes

Lecture 69 Header Interfaces

Lecture 70 Demo of Refactoring to a Testable Design

Lecture 71 How Much Test Coverage is Enough?

Lecture 72 Testing Trivial Code

Lecture 73 The Rule of Testing a Single Concern

Lecture 74 More on Best Practices

Lecture 75 Generating Unit Test Method Signatures

Lecture 76 Conclusion

Lecture 77 BONUS LECTURE

Section 7: Appendix. Intro to Dependency Injection

Lecture 78 Outline

Lecture 79 Definition of DIP

Lecture 80 Dependencies

Lecture 81 Volatile and Stable Dependencies

Lecture 82 Definition of IoC and DI

Lecture 83 DIP Violation Demo

Lecture 84 Refactoring to a Better Design

Lecture 85 Dependency Injection Techniques

Lecture 86 Architectural Implications

Lecture 87 Common Smells of DIP Violation

Lecture 88 Conclusion

Section 8: Appendix. Intro to DI. IoC-Containers

Lecture 89 Outline

Lecture 90 Pure DI and IoC-Containers

Lecture 91 Building a Simple IoC-Container

Lecture 92 Service Locator

Lecture 93 Demo with an IoC-Container

Lecture 94 Conclusion

Beginners who want to write better code,Anyone who is interested in Unit Testing

Course Information:

Udemy | English | 7h 39m | 2.92 GB
Created by: Engineer Spock

You Can See More Courses in the Developer >> Greetings from CourseDown.com

New Courses

Scroll to Top