On this page
JUnit Testing Framework
Overview
Qualified supports writing tests for Groovy using JUnit 4.
Basic Example
Solution
class Adder {
static def add(a, b) { a + b }
}
Tests
import org.junit.Test
import static org.junit.Assert.assertEquals
class TestAdd {
@Test
void "1 + 1 = 2"() {
assertEquals(2, Adder.add(1, 1))
}
}
Learn More
You can learn more on the JUnit website.