Skip to content

Commit

Permalink
Add multiple vocabulary ternary FactType test
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
otaviojacobi committed Dec 3, 2024
1 parent 4b780c8 commit 9c97046
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/pilots.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ const {
_nestedOr,
_nestedAnd,
stripLinkTable,
vocabulary,
} = require('./sbvr-helper');
const { Table, attribute, rule } = TableSpace();

const shortTextType = term('Short Text', 'Type');
const integerType = term('Integer', 'Type');
const lengthType = term('Length', 'Type');
const eventName = term('event name');
const scopedEventName = term('event name', 'Event');

const name = term('name');
const honorific = term('honorific');
Expand All @@ -40,6 +43,15 @@ const pilots = numberedTerms(pilot, 2);
const planes = numberedTerms(plane, 2);

describe('pilots', function () {
// Vocabulary: Event
test(vocabulary('Event'));
// Term: event name
test(Table(eventName));
// Concept Type: Short Text (Type)
test(attribute(conceptType(shortTextType)));

// Vocabulary: Default
test(vocabulary('Default'));
// Term: name
test(Table(name));
// Concept Type: Short Text (Type)
Expand Down Expand Up @@ -118,6 +130,8 @@ describe('pilots', function () {
test(attribute(synonymousForm(pilots[1], verb('was taught by'), pilots[0])));
// Fact type: pilot is experienced
test(Table(factType(pilot, verb('is experienced'))));
// Fact type: pilot has name has event name (Event)
test(Table(factType(pilot, verb('has'), name, verb('has'), scopedEventName)));
// Term: veteran pilot
test(Table(veteranPilot));
// Definition: pilot that can fly at least 2 planes
Expand Down

0 comments on commit 9c97046

Please sign in to comment.