File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/test/java/org/scijava/search Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 9696 <releaseProfiles >sign,deploy-to-scijava</releaseProfiles >
9797
9898 <prettytime .version>4.0.1.Final</prettytime .version>
99-
100- <!-- NB: Pin imagej1 version for test -->
101- <imagej1 .version>1.54b</imagej1 .version>
10299 </properties >
103100
104101 <repositories >
Original file line number Diff line number Diff line change 2828 */
2929package org .scijava .search ;
3030
31- import static org .junit .Assert .assertEquals ;
31+ import static org .junit .Assert .assertNotNull ;
3232import static org .junit .Assert .assertTrue ;
3333
3434import java .net .URL ;
@@ -66,6 +66,7 @@ public void testSourceLocationDefaultSourceDirectory()
6666 throws SourceNotFoundException
6767 {
6868 URL url = SourceFinder .sourceLocation (Context .class , logService );
69+ assertNotNull (url );
6970 String expected = "^/scijava/scijava-common/blob/scijava-common-[0-9\\ .]+" +
7071 "/src/main/java/org/scijava/Context\\ .java$" ;
7172 String actual = url .getPath ();
@@ -82,8 +83,9 @@ public void testSourceLocationOverriddenSourceDirectory()
8283 throws SourceNotFoundException
8384 {
8485 URL url = SourceFinder .sourceLocation (IJ .class , logService );
85- // NB: we expect the version as pinned in pom.xml
86- String expected = "/imagej/ImageJ/blob/v1.54b/ij/IJ.java" ;
87- assertEquals (expected , url .getPath ());
86+ assertNotNull (url );
87+ String expected = "^/imagej/ImageJ/blob/v1\\ .[0-9a-z]+/ij/IJ\\ .java$" ;
88+ String actual = url .getPath ();
89+ assertTrue ("Unexpected path: " + actual , actual .matches (expected ));
8890 }
8991}
You can’t perform that action at this time.
0 commit comments