use of com.inova8.intelligentgraph.model.Resource in project com.inova8.intelligentgraph by peterjohnlawrence.
the class Example6_Tests method example6_1.
/**
* Example 6 1.
*/
@Test
@Order(1)
void example6_1() {
try {
Thing aPerson_Measurement = source.getThing(":Measurement_1");
Resource bmi = aPerson_Measurement.getFact(":hasBMI");
assertEquals("21.453287197231838", bmi.stringValue());
} catch (Exception e) {
assertEquals("", e.getMessage());
e.printStackTrace();
}
}
use of com.inova8.intelligentgraph.model.Resource in project com.inova8.intelligentgraph by peterjohnlawrence.
the class Example6_Tests method example6_2.
/**
* Example 6 2.
*/
@Test
@Order(2)
void example6_2() {
try {
Thing aPerson_Measurement = source.getThing(":Measurement_2");
Resource bmi = aPerson_Measurement.getFact(":hasBMI");
assertEquals("22.03856749311295", bmi.stringValue());
} catch (Exception e) {
assertEquals("", e.getMessage());
e.printStackTrace();
}
}
use of com.inova8.intelligentgraph.model.Resource in project com.inova8.intelligentgraph by peterjohnlawrence.
the class Example6_Tests method example6_5.
/**
* Example 6 5.
*/
@Test
@Order(5)
void example6_5() {
try {
Resource bmi = source.getThing(":aPerson").getFact(":Observation@:BMIObservation[:hasDate %1]/:hasBMI", literal(LocalDate.parse("2021-08-02")));
assertEquals("22.03856749311295", bmi.stringValue());
} catch (Exception e) {
assertEquals("", e.getMessage());
e.printStackTrace();
}
}
use of com.inova8.intelligentgraph.model.Resource in project com.inova8.intelligentgraph by peterjohnlawrence.
the class ExampleLanguageTest_Tests method example1_3.
/**
* Example 1 3.
*/
@Test
@Order(3)
void example1_3() {
try {
Thing peter = source.getThing(":aPerson");
Resource bmi = peter.getFact(":hasBMIpytest");
assertEquals("21.453287197231838", bmi.stringValue());
} catch (Exception e) {
assertEquals("", e.getMessage());
e.printStackTrace();
}
}
use of com.inova8.intelligentgraph.model.Resource in project com.inova8.intelligentgraph by peterjohnlawrence.
the class ExampleLanguageTest_Tests method example1_4.
/**
* Example 1 4.
*/
@Test
@Order(4)
void example1_4() {
try {
Thing peter = source.getThing(":aPerson");
Resource bmi = peter.getFact(":hasBMIpy");
assertEquals("21.453287197231838", bmi.stringValue());
} catch (Exception e) {
assertEquals("", e.getMessage());
e.printStackTrace();
}
}
Aggregations