Skip to content

Commit 35fe4a1

Browse files
committed
. d updated markdown snippets
1 parent 8ad1652 commit 35fe4a1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

approvaltests/docs/Configuration.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,12 @@ Function2<Class, String, File> myFinder = new Function2<Class, String, File>()
152152
@Override
153153
public File call(Class clazz, String fileName)
154154
{
155-
return new File("src/test/java/" + clazz.getPackage().getName().replaceAll("\\.", "/"));
155+
return new File(ClassUtils.getProjectRootPath() + "/src/test/java/"
156+
+ clazz.getPackage().getName().replaceAll("\\.", "/"));
156157
}
157158
};
158159
```
159-
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/namer/NamerSamplesTest.java#L16-L25' title='Snippet source file'>snippet source</a> | <a href='#snippet-define_alternative_source_directory_finder' title='Start of snippet'>anchor</a></sup>
160+
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/namer/NamerSamplesTest.java#L17-L27' title='Snippet source file'>snippet source</a> | <a href='#snippet-define_alternative_source_directory_finder' title='Start of snippet'>anchor</a></sup>
160161
<!-- endSnippet -->
161162
### Using alternatives
162163
Thanks to the try block, the default is restored afterwards allowing tests to be independent.
@@ -169,7 +170,7 @@ try (SourceDirectoryRestorer sdr = TestUtils.registerSourceDirectoryFinder(myFin
169170
Approvals.verify("Ragunath");
170171
}
171172
```
172-
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/namer/NamerSamplesTest.java#L26-L31' title='Snippet source file'>snippet source</a> | <a href='#snippet-configure_alternative_source_directory' title='Start of snippet'>anchor</a></sup>
173+
<sup><a href='/approvaltests-tests/src/test/java/org/approvaltests/namer/NamerSamplesTest.java#L28-L33' title='Snippet source file'>snippet source</a> | <a href='#snippet-configure_alternative_source_directory' title='Start of snippet'>anchor</a></sup>
173174
<!-- endSnippet -->
174175

175176
---

0 commit comments

Comments
 (0)