Skip to content

Commit 0b0d63a

Browse files
committed
Test duplicated custom
1 parent 269683a commit 0b0d63a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
key1=one
2+
key2=two
3+
key3=three
4+
key2=four

fj-core/src/test/java/test/org/fugerit/java/core/util/TestPropsUtils.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@
88
import java.io.IOException;
99
import java.util.Collection;
1010
import java.util.Map;
11+
import java.util.stream.Collectors;
1112

1213
@Slf4j
1314
public class TestPropsUtils {
1415

16+
@Test
17+
public void testDuplicatedCustom() throws IOException {
18+
Collection<Map.Entry<String,String>> duplicated = PropsUtils.findDuplicatedKeys( "file://src/main/resources/core/util/props_utils/duplicated_custom.properties" ).getDuplications();
19+
log.info( "duplicated count : {}, keys : {}", duplicated.size(), duplicated.stream().map( e -> e.getKey() ).collect( Collectors.toSet() ) );
20+
Assert.assertNotNull( duplicated );
21+
}
22+
1523
@Test
1624
public void testDuplicated1File() throws IOException {
1725
Collection<Map.Entry<String,String>> duplicated = PropsUtils.findDuplicatedKeys( "file://src/main/resources/core/util/props_utils/duplicated_1.properties" ).getDuplications();

0 commit comments

Comments
 (0)