@@ -204,8 +204,8 @@ void shouldHandleEmptyFile() {
204204 // then
205205 assertThat (result , sameInstance (configFile ));
206206 assertThat (reader .getRoot (), nullValue ());
207- assertThat (reader .getKeys ( true ), empty ());
208- assertThat (reader .getChildKeys ("" ), empty ());
207+ assertThat (reader .getLeafPaths ( ), empty ());
208+ assertThat (reader .getChildPaths ("" ), empty ());
209209 }
210210
211211 @ Test
@@ -232,16 +232,16 @@ void shouldReadWithCustomCharset() {
232232 }
233233
234234 @ Test
235- void shouldReturnKeysOfFile () {
235+ void shouldReturnPathsOfFile () {
236236 // given
237237 Path file = copyFileFromResources (COMPLETE_FILE );
238238 YamlFileReader reader = new YamlFileReader (file );
239239
240240 // when
241- Set <String > keys = reader .getKeys ( false );
241+ Set <String > paths = reader .getPaths ( );
242242
243243 // then
244- assertThat (keys , contains ("test" , "test.duration" , "test.systemName" ,
244+ assertThat (paths , contains ("test" , "test.duration" , "test.systemName" ,
245245 "sample" , "sample.ratio" , "sample.ratio.order" , "sample.ratio.fields" ,
246246 "version" ,
247247 "features" , "features.boring" , "features.boring.skip" , "features.boring.colors" , "features.boring.dustLevel" ,
@@ -250,16 +250,16 @@ void shouldReturnKeysOfFile() {
250250 }
251251
252252 @ Test
253- void shouldReturnLeafNodeKeysInFile () {
253+ void shouldReturnLeafPathsInFile () {
254254 // given
255255 Path file = copyFileFromResources (COMPLETE_FILE );
256256 YamlFileReader reader = new YamlFileReader (file );
257257
258258 // when
259- Set <String > keys = reader .getKeys ( true );
259+ Set <String > paths = reader .getLeafPaths ( );
260260
261261 // then
262- assertThat (keys , contains ("test.duration" , "test.systemName" ,
262+ assertThat (paths , contains ("test.duration" , "test.systemName" ,
263263 "sample.ratio.order" , "sample.ratio.fields" ,
264264 "version" ,
265265 "features.boring.skip" , "features.boring.colors" , "features.boring.dustLevel" ,
@@ -274,11 +274,11 @@ void shouldTreatEmptyMapsAsLeafNodes() {
274274 YamlFileReader reader = new YamlFileReader (file );
275275
276276 // when
277- Set <String > keys = reader .getKeys ( true );
277+ Set <String > paths = reader .getLeafPaths ( );
278278
279279 // then
280- assertThat (keys , hasSize (24 ));
281- assertThat (keys , hasItems (
280+ assertThat (paths , hasSize (24 ));
281+ assertThat (paths , hasItems (
282282 "message-key.conditionalElem.conditionals.low.conditionals" , // empty map
283283 "message-key.conditionalElem.conditionals.med.color" ,
284284 "message-key.conditionalElem.conditionals.high.conditionalElem.bold" ,
@@ -290,29 +290,29 @@ void shouldTreatEmptyMapsAsLeafNodes() {
290290 }
291291
292292 @ Test
293- void shouldReturnChildrenPathsOfGivenPath () {
293+ void shouldReturnChildPathsOfGivenPath () {
294294 // given
295295 Path file = copyFileFromResources (COMPLETE_FILE );
296296 YamlFileReader reader = new YamlFileReader (file );
297297
298298 // when
299- Set <String > keys = reader .getChildKeys ("features.boring" );
299+ Set <String > paths = reader .getChildPaths ("features.boring" );
300300
301301 // then
302- assertThat (keys , contains ("features.boring.skip" , "features.boring.colors" , "features.boring.dustLevel" ));
302+ assertThat (paths , contains ("features.boring.skip" , "features.boring.colors" , "features.boring.dustLevel" ));
303303 }
304304
305305 @ Test
306- void shouldReturnChildrenPathsOfRoot () {
306+ void shouldReturnChildPathsOfRoot () {
307307 // given
308308 Path file = copyFileFromResources (COMPLETE_FILE );
309309 YamlFileReader reader = new YamlFileReader (file );
310310
311311 // when
312- Set <String > keys = reader .getChildKeys ("" );
312+ Set <String > paths = reader .getChildPaths ("" );
313313
314314 // then
315- assertThat (keys , contains ("test" , "sample" , "version" , "features" , "security" ));
315+ assertThat (paths , contains ("test" , "sample" , "version" , "features" , "security" ));
316316 }
317317
318318 @ Test
@@ -322,8 +322,8 @@ void shouldReturnEmptySetForNonExistentOrLeafValue() {
322322 YamlFileReader reader = new YamlFileReader (file );
323323
324324 // when
325- Set <String > bogusChildren = reader .getChildKeys ("bogus" );
326- Set <String > leafChildren = reader .getChildKeys ("features.boring.colors" );
325+ Set <String > bogusChildren = reader .getChildPaths ("bogus" );
326+ Set <String > leafChildren = reader .getChildPaths ("features.boring.colors" );
327327
328328 // then
329329 assertThat (bogusChildren , empty ());
0 commit comments