Today I release an initial version of Čaj, a Java library that allows you to formulate expectations about your code in your tests.
Expectations formulated with Čaj are straightforward to read and simple to understand. Here are a few examples:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect(yourTests).to.be("simple"); | |
expect(javasAge).to.be.within(15, 25); | |
expect(collection).to.include(aSpecificValue); | |
expect(java).to.have.a.property("age").which.is.at.least(20); |
You can find out more on Čaj’s GitHub page.