Skip to content

Commit

Permalink
Add unit test for relative file URL properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeEdgar committed Apr 5, 2019
1 parent bf1991a commit fddbc86
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,15 @@ public void testProducePropertiesUnreadable() {
bean.produceProperties(point);
});
}

@Test
public void testProducePropertiesFileUrl() {
PropertyResource annotation = annotation("file:./src/test/resources/fileprops.properties",
PropertyResourceFormat.PROPERTIES,
false);
InjectionPoint point = injectionPoint(annotation, Properties.class, Member.class, "", -1);
Properties result = bean.produceProperties(point);
assertNotNull(result);
assertEquals(1, result.size());
}
}
1 change: 1 addition & 0 deletions src/test/resources/fileprops.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
one=1

0 comments on commit fddbc86

Please sign in to comment.