Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Foundations of TDD in Scala 3 with ScalaTest: The Principles

via CodeSignal

Overview

This course introduces Test-Driven Development (TDD) for Scala 3 projects, covering the Red-Green-Refactor workflow, TDD mindset, and setup with ScalaTest. Learn best practices like SOLID principles and dependency injection, and explore TDD's impact on code quality and speed compared to traditional approaches.

Syllabus

  • Unit 1: Introduction to TDD with Scala: What, Why, and How
    • Write a Test, Watch It Fail
    • Make the Test Pass!
    • Refactor for Readability and Clarity
  • Unit 2: Generalizing Solutions with TDD
    • Writing Another Red Test
    • Making the New Test Pass!
    • Refactoring with Parametrized Tests
  • Unit 3: The TDD Mindset: Thinking in Tests with Scala
    • Defining the First Test
    • Making the First Test Pass!
    • Creating Another Failing Test
    • Implementing the initial Cart Total Functionality
    • Refactor the Cart Total Function
    • Make it Red!
    • Make it Green!
    • Refactor Using Sum
  • Unit 4: Setting Up and Mastering Testing in Scala with ScalaTest
    • Understanding Testing with ScalaTest and AnyFunSpec
    • Using Assertions
    • Refactoring Test Setup with BeforeAndAfter
    • Grouping Email Tests Using Describe
    • Expect an Exception!
    • Validating Multiple Emails using Parametrized Testing
  • Unit 5: Managing Dependencies in TDD with Scala
    • Writing the first Failing Test
    • Making it Pass!
    • Refactoring with the AAA Pattern
    • Testing for Logging (RED)
    • Making it Green!
    • Review and Refactor
  • Unit 6: Introduction to the AAA Pattern in TDD
    • Refactoring a Test Suite Using AAA

Reviews

Start your review of Foundations of TDD in Scala 3 with ScalaTest: The Principles

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.