List of usage examples for java.io UncheckedIOException getMessage
public String getMessage()
From source file:objective.taskboard.utils.ZipUtilsTest.java
@Test public void whenZipFolderNonexistent_ShouldThrowAnUncheckedIOException() throws IOException { Path source = Paths.get("sourceNonexistent"); Path destiny = Paths.get("destinyNonexistent"); try {/* w w w. j a v a 2 s . c o m*/ zip(source, destiny); fail("Should have thrown UncheckedIOException"); } catch (UncheckedIOException e) { assertEquals("Exception message", "java.nio.file.NoSuchFileException: sourceNonexistent", e.getMessage()); } finally { deleteQuietly(destiny.toFile()); } }