Cargando…

Practical Test-Driven Development using C# 7 : Unleash the power of TDD by implementing real world examples under .NET environment and JavaScript.

Test-Driven Development (TDD) is a methodology that helps you to write as little as code as possible to satisfy the software requirements, and that what you've written does what its supposed to do. If you're looking for a practical resource on Test-Driven Development this is the book for y...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Callaway, John
Otros Autores: Hunt, Clayton
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing, 2018.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Copyright and Credits; Packt Upsell; Foreword; Contributors; Table of Contents; Preface; Chapter 1: Why TDD is Important; First, a little background; John's story on TDD; Clayton's story on TDD; So, what is TDD?; An approach to TDD ; An alternative approach ; The process; Red, green, and refactor; Coder's block; Why should we care?; Arguments against TDD; Testing takes time; Testing is expensive; Testing is difficult; We don't know how; Arguments in favor of TDD; Reduces the effort of manual testing; Reduces bug count; Ensures some level of correctness.
  • Removes the fear of refactoringA better architecture ; Faster development ; Different types of test; Unit tests ; Acceptance tests ; Integration tests ; End to end tests ; Quantity of each test type ; Parts of a unit test; Arrange; Act; Assert; Requirements ; Why are they important? ; User stories ; Role ; Request ; Reason ; Gherkin ; Givens ; When ; Then ; Our first tests in C#; Growing the application with tests; Our first tests in JavaScript; Why does it matter?; Summary; Chapter 2: Setting Up the .NET Test Environment; Installing the .NET Core SDK.
  • Getting set up with VS CodeDownloading the IDE; Installing the VS Code; Adding extensions; Creating a project in VS Code; Setting up Visual Studio Community; Downloading Visual Studio Community; Installing Visual Studio Community; Switching to xUnit; Code katas; FizzBuzz; Creating the test project; The Given3ThenFizz test; The Given5ThenBuzz test; The Given15ThenFizzBuzz test; The Given1Then1 test; Theories; Solution to the FizzBuzz Problem; What is Speaker Meet?; Web API project; Listing Speakers (API); Requirements; A new test file; Summary; Chapter 3: Setting Up a JavaScript Environment.
  • Node.jsWhat is Node?; Why do we need Node?; Installing Node; Linux; Mac OSX; Windows; NPM; What is NPM?; Why do we need NPM?; Installing NPM?; A quick introduction to JavaScript IDEs; Visual Studio Code; Why Visual Studio Code?; Installing Visual Studio Code; Linux; Mac; Windows; Installing the plugins you will need; Configuring the testing environment; WebStorm; Why WebStorm?; Installing WebStorm; Linux; Mac; Windows; Installing the plugins you will need; Configuring the testing environment; Create React App; What is Create React App?; Installing the global module.
  • Creating a React applicationRunning the Create React App script; Mocha and Chai; Jest; Mocha; Chai; Sinon; Enzyme; Ejecting the React app; Configuring to use Mocha and Chai; A quick kata to check our test setup; The requirements; The execution; Starting the kata; Summary; Chapter 4: What to Know Before Getting Started; Untestable code; Dependency Injection; Static; Singleton; Global state; Abstracting third-party software; Test doubles; Mocking frameworks; The SOLID principles; The Single Responsibility Principle; The Open/Closed principle; The Liskov Substitution principle.