Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Professional Scala
  • Toc
  • feedback
Professional Scala

Professional Scala

By : Hartmann, Shevchenko
4.2 (13)
close
Professional Scala

Professional Scala

4.2 (13)
By: Hartmann, Shevchenko

Overview of this book

This book teaches you how to build and contribute to Scala programs, recognizing common patterns and techniques used with the language. You’ll learn how to write concise, functional code with Scala. After an introduction to core concepts, syntax, and writing example applications with scalac, you’ll learn about the Scala Collections API and how the language handles type safety via static types out-of-the-box. You’ll then learn about advanced functional programming patterns, and how you can write your own Domain Specific Languages (DSLs). By the end of the book, you’ll be equipped with the skills you need to successfully build smart, efficient applications in Scala that can be compiled to the JVM.
Table of Contents (10 chapters)
close

ScalaTest – A Popular DSL


Note

ScalaTest was introduced in Chapter 1, Setting up the Development Environment, but as we'll use it extensively in this lecture, we'll do a little recap here and make sure that everyone has a working ScalaTest environment.

In this section, we'll have a look at a popular library for testing your Scala programs, ScalaTest, and see how the library uses DSLs to allow its users to write readable tests in various styles.

The purpose of looking at ScalaTest is twofold. First off, ScalaTest is a widely used testing library for Scala projects, so you're likely to end up using it when you're using Scala professionally. Secondly, it's a good example of how to use DSLs to make your code more readable.

By the end of this section, you should be able to:

  • Identify how to use ScalaTest in your own projects

  • Identify the various styles that ScalaTest offers and be able to pick the one that's relevant to your project

  • Write ScalaTest tests using the F latSpec style

Adding...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete