[jbehave-dev] [jira] (JBEHAVE-1056) ResolveToPackagedName path resolver is broken on Windows
Title: Message Title Mauro Talevi updated an issue JBehave / JBEHAVE-1056 ResolveToPackagedName path resolver is broken on Windows Change By: Mauro Talevi Affects Version/s: 3.x Affects Version/s: 3.9.5 Fix Version/s: 3.9.6 Add Comment This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c) - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
[jbehave-dev] [jira] (JBEHAVE-1056) ResolveToPackagedName path resolver is broken on Windows
Title: Message Title Mauro Talevi commented on an issue Re: ResolveToPackagedName path resolver is broken on Windows Could you please provide an example project reproducing this behaviour, in particular the configuration you use. Add Comment JBehave / JBEHAVE-1056 ResolveToPackagedName path resolver is broken on Windows Current implementation of 'org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName' is the following: {code:java} public static class ResolveToPackagedName extends AbstractPathResolver { public String resolveName(StoryLocation storyLocation , String extension) { String name = storyLocation .getPath().replace... This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c) - To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
[jbehave-dev] [jira] (JBEHAVE-1056) ResolveToPackagedName path resolver is broken on Windows
Title: Message Title Dmitry Pelevin commented on an issue Re: ResolveToPackagedName path resolver is broken on Windows You can get project with the same configuration at GitHub: https://github.com/OpsIT/berlin-clock But I need to notice that gradlew.bat from this repository is broken and you have to replace it with gradle.bat from any other source, or just use standalone Gradle. Before running this example project update com.ubs.opsit.interviews.BerlinClockFixture class to make test always pass: public class BerlinClockFixture { //... @Then(the clock should look like $) public void thenTheClockShouldLookLike(String theExpectedBerlinClockOutput) { //assertThat(berlinClock.convertTime(theTime), is(equalTo(theExpectedBerlinClockOutput))); Assert.assertTrue(true); } } After this change you will be able to see failed tests (because of path resolver). Just run: gradle check If you wish to check the fact that the reason of this fail is path resolver - you need to update update com.ubs.opsit.interviews.support.BehaviouralTestEmbedder and replace path resolver with org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToSimpleName implementation: public final class BehaviouralTestEmbedder extends ConfigurableEmbedder { //... static class SandboxStoryReporterBuilder extends StoryReporterBuilder { public SandboxStoryReporterBuilder() { withCodeLocation(codeLocationFromClass(SandboxStoryReporterBuilder.class)); withDefaultFormats(); withFormats(HTML, TXT, CONSOLE); withFailureTrace(true); // you need to add the following line withPathResolver(new FilePrintStreamFactory.ResolveToSimpleName()); } } } Add Comment
[jbehave-dev] [jira] (JBEHAVE-1056) ResolveToPackagedName path resolver is broken on Windows
Title: Message Title Dmitry Pelevin created an issue JBehave / JBEHAVE-1056 ResolveToPackagedName path resolver is broken on Windows Issue Type: Bug Affects Versions: 3.x Assignee: Unassigned Components: Core Created: 23/Nov/14 12:53 PM Environment: Windows 7 x64 java version 1.7.0_71 Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) Priority: Major Reporter: Dmitry Pelevin Current implementation of 'org.jbehave.core.reporters.FilePrintStreamFactory.ResolveToPackagedName' is the following: public static class ResolveToPackagedName extends AbstractPathResolver { public String resolveName(StoryLocation storyLocation , String extension) { String name = storyLocation .getPath().replace('/', '.'); if (name .startsWith(.)) { name = name.substring(1); } return StringUtils.substringBeforeLast( name, .) + . + extension ;