TomSpencerLondon / assert-j-koans

Koans for AssertJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to the AssertJ Koans

For a deeper dive check out the AssertJ docs

Contents

Definition of ‘Koan’

Kōan is a zen word meaning the enlightenment or awakening of a person, usually through a puzzle or riddle. The most common one is "What is the sound of one hand clapping?"

What is this all about?

AssertJ is a fluent assertions library to help with writing more expressive tests. AssertJ produces better error messages and a lot more functionality than standard JUnit assertions.

These Koans are an interactive and fun way to be introduced to and learn how to test with AssertJ.

Current Lessons

  • Basic Assertions
  • Collection Assertions
  • Exception Assertions
  • BDDAssertions
  • Custom Assertions

Getting Started

Clone the repo and open it up in your preferred IDE.

Run the unit test, see it fail, then fill in the blank ("____"). Run it again to see it pass.

Tips & Tricks

  • Play: Experimentation is a powerful learning tool. Don't be afraid to try stuff out, and run it to see what happens.
  • Run the Test: It is valuable to see what the results are. All Koans are designed to produce something even before they are filled in.
  • Debug: Set some break point and walk through the code. It's a great way to get details. ({"Ctrl+R, Ctrl+T"}) will run in debug mode.
  • Do Them with a Friend: Learning is more fun and less frustrating when you have a friend with you.
  • Retrospect after each Koan: True insight comes from reflecting on the answer, not just obtaining it.

About

Koans for AssertJ


Languages

Language:Java 100.0%