Skip to content

Commit 2e20268

Browse files
committed
required props default change
1 parent e654474 commit 2e20268

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/test/java/edu/isi/oba/RestrictionsTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class RestrictionsTest {
3636
put(CONFIG_FLAG.DEFAULT_DESCRIPTIONS, true);
3737
put(CONFIG_FLAG.DEFAULT_PROPERTIES, true);
3838
put(CONFIG_FLAG.FOLLOW_REFERENCES, true);
39-
put(CONFIG_FLAG.REQUIRED_PROPERTIES_FROM_CARDINALITY, true);
39+
put(CONFIG_FLAG.REQUIRED_PROPERTIES_FROM_CARDINALITY, false);
4040
}};
4141

4242
/**
@@ -245,10 +245,10 @@ public void testObjectExactCardinalityWithArraysGenerated() throws OWLOntologyCr
245245

246246
/**
247247
* This test attempts to get the OAS representation of the exact cardinality of an ObjectProperty,
248-
* when properties may or may not be arrays, depending on cardinality.
248+
* when properties may or may not be arrays, depending on cardinality. Plus, list of required properties are set to be generated for schemas.
249249
*/
250250
@Test
251-
public void testObjectExactCardinalityWithoutArraysGenerated() throws OWLOntologyCreationException, Exception {
251+
public void testObjectExactCardinalityWithRequiredPropertiesAndWithoutArraysGenerated() throws OWLOntologyCreationException, Exception {
252252
try {
253253
this.initializeLogger();
254254
YamlConfig config_data = get_yaml_data("examples/restrictions/config.yaml");
@@ -257,6 +257,7 @@ public void testObjectExactCardinalityWithoutArraysGenerated() throws OWLOntolog
257257
String desc = ObaUtils.getDescription(cls, mapper.ontologies.get(0), true);
258258

259259
this.configFlags.put(CONFIG_FLAG.ALWAYS_GENERATE_ARRAYS, false);
260+
this.configFlags.put(CONFIG_FLAG.REQUIRED_PROPERTIES_FROM_CARDINALITY, true);
260261
MapperSchema mapperSchema = new MapperSchema(mapper.ontologies, cls, desc, mapper.schemaNames, mapper.ontologies.get(0), this.configFlags);
261262
Schema schema = mapperSchema.getSchema();
262263

0 commit comments

Comments
 (0)