From dde1d4c7ffab89c57b4af724908a13f83efea3fa Mon Sep 17 00:00:00 2001 From: Igor Stepanov Date: Thu, 4 Mar 2021 06:41:26 +0000 Subject: [PATCH] [Core] Use canonical path in tests (#2253) --- .../java/io/cucumber/core/plugin/PluginFactoryTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java b/core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java index 72ce5aaa41..74674854a3 100644 --- a/core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java +++ b/core/src/test/java/io/cucumber/core/plugin/PluginFactoryTest.java @@ -91,7 +91,7 @@ void creates_parent_directories() { } @Test - void cant_create_plugin_when_parent_directory_is_a_file() { + void cant_create_plugin_when_parent_directory_is_a_file() throws IOException { Path htmlReport = tmp.resolve("target/cucumber/reports"); PluginOption htmlOption = parse("html:" + htmlReport); plugin = fc.create(htmlOption); @@ -101,8 +101,8 @@ void cant_create_plugin_when_parent_directory_is_a_file() { IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> fc.create(jsonOption)); assertThat(exception.getMessage(), is(equalTo( - "Couldn't create parent directories of '" + jsonReport + "'.\n" + - "Make sure the the parent directory '" + jsonReport.getParent() + "' isn't a file.\n" + + "Couldn't create parent directories of '" + jsonReport.toFile().getCanonicalPath() + "'.\n" + + "Make sure the the parent directory '" + jsonReport.getParent().toFile().getCanonicalPath() + "' isn't a file.\n" + "\n" + "Note: This usually happens when plugins write to colliding paths.\n" + "For example: 'html:target/cucumber, json:target/cucumber/report.json'\n" +