Skip to content

Commit

Permalink
required props default change
Browse files Browse the repository at this point in the history
  • Loading branch information
cweedall committed May 6, 2024
1 parent e654474 commit 2e20268
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/java/edu/isi/oba/RestrictionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class RestrictionsTest {
put(CONFIG_FLAG.DEFAULT_DESCRIPTIONS, true);
put(CONFIG_FLAG.DEFAULT_PROPERTIES, true);
put(CONFIG_FLAG.FOLLOW_REFERENCES, true);
put(CONFIG_FLAG.REQUIRED_PROPERTIES_FROM_CARDINALITY, true);
put(CONFIG_FLAG.REQUIRED_PROPERTIES_FROM_CARDINALITY, false);
}};

/**
Expand Down Expand Up @@ -245,10 +245,10 @@ public void testObjectExactCardinalityWithArraysGenerated() throws OWLOntologyCr

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

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

Expand Down

0 comments on commit 2e20268

Please sign in to comment.