forked from gscokart/jbehave-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unit test to show decoding issue when the location contains a + char
due to URLDecode.decode
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
jbehave-core/src/test/java/org/jbehave/core/io/LoadFromRelativeFileTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.jbehave.core.io; | ||
|
||
import java.net.MalformedURLException; | ||
import java.net.URL; | ||
import org.junit.*; | ||
import static org.junit.Assert.*; | ||
import static org.hamcrest.Matchers.*; | ||
|
||
public class LoadFromRelativeFileTest { | ||
|
||
@Test | ||
public void testLoadFromRelativeFile() throws MalformedURLException { | ||
URL baseLocation = CodeLocations.codeLocationFromClass(LoadFromRelativeFileTest.class); | ||
URL subdir=new URL(baseLocation.toString()+"/test+dir"); | ||
LoadFromRelativeFile load = new LoadFromRelativeFile(subdir); | ||
String storyText=load.loadStoryAsText("dummy.story"); | ||
assertThat(storyText, equalTo("dummy story file")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dummy story file |