“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) { } }”
Quote by Lasse Koskela
Work
Test Driven: Practical TDD and Acceptance TDD for Java Developers
Browse quotes and source details for this work. more
Author
You May Also Like
Source: Fifty Quick Ideas To Improve Your Tests
Source: Fifty Quick Ideas To Improve Your Tests
Source: The Golden Road: How Ancient India Transformed the World
Source: The Reentrant
Source: The Golden Road: How Ancient India Transformed the World
Source: Les Misérables