Search in sources :

Example 51 with SchemaConcept

use of ai.grakn.concept.SchemaConcept in project grakn by graknlabs.

the class GraqlPrinterTest method testConcept.

@Test
public void testConcept() {
    Printer printer = Printers.graql(true);
    SchemaConcept concept = rule.tx().admin().getMetaConcept();
    String conceptString = printer.graqlString(concept);
    assertThat(conceptString, containsString("label"));
    assertThat(conceptString, containsString(Schema.MetaSchema.THING.getLabel().getValue()));
    assertThat(conceptString, not(containsString("sub")));
    assertThat(conceptString, not(containsString("isa")));
}
Also used : SchemaConcept(ai.grakn.concept.SchemaConcept) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Printer(ai.grakn.graql.Printer) Test(org.junit.Test)

Aggregations

SchemaConcept (ai.grakn.concept.SchemaConcept)51 Label (ai.grakn.concept.Label)19 Set (java.util.Set)15 Type (ai.grakn.concept.Type)14 GraknTx (ai.grakn.GraknTx)12 HashSet (java.util.HashSet)12 ConceptId (ai.grakn.concept.ConceptId)11 Stream (java.util.stream.Stream)11 Test (org.junit.Test)11 AttributeType (ai.grakn.concept.AttributeType)10 Property (com.pholser.junit.quickcheck.Property)10 Role (ai.grakn.concept.Role)9 Concept (ai.grakn.concept.Concept)8 Sets (com.google.common.collect.Sets)8 Optional (java.util.Optional)8 RelationshipType (ai.grakn.concept.RelationshipType)7 Rule (ai.grakn.concept.Rule)7 VarPatternAdmin (ai.grakn.graql.admin.VarPatternAdmin)7 ErrorMessage (ai.grakn.util.ErrorMessage)7 Var (ai.grakn.graql.Var)6