Test Driven Quotes

Rate this book
Clear rating
Test Driven: Practical TDD and Acceptance TDD for Java Developers Test Driven: Practical TDD and Acceptance TDD for Java Developers by Lasse Koskela
164 ratings, 3.84 average rating, 10 reviews
Open Preview
Test Driven Quotes Showing 1-1 of 1
“The approach shown... is a common pattern for testing exception-throwing behavior with JUnit.

@Test
public void missingValueRaisesException() throws Exception {
try {
new Template("${foo}").evaluate();
fail("evaluate() should throw an exception if "
+ "a variable was left without a value!");
} catch (MissingValueException expected) {
}
}

Lasse Koskela, Test Driven: Practical TDD and Acceptance TDD for Java Developers