Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit 5a5675e

Browse files
committed
add test for default value
1 parent ae495c7 commit 5a5675e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/src/test/java/org/neo4j/graphalgo/core/ProcedureConfigurationTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,11 @@ public void valueIfKeyPresent() {
7070
ProcedureConfiguration procedureConfiguration = ProcedureConfiguration.create(map);
7171
assertEquals("scc", procedureConfiguration.getString("writeProperty", "defaultValue"));
7272
}
73+
74+
@Test
75+
public void convertNonDoubleDefaultValues() {
76+
Map<String, Object> map = MapUtil.map("defaultValue", 1L);
77+
ProcedureConfiguration procedureConfiguration = ProcedureConfiguration.create(map);
78+
assertEquals(1.0, procedureConfiguration.getWeightPropertyDefaultValue(0.0), 0.001);
79+
}
7380
}

0 commit comments

Comments
 (0)