Search in sources :

Example 1 with ComputeQuery

use of ai.grakn.graql.ComputeQuery in project grakn by graknlabs.

the class QueryToStringTest method testComputeQuerySubgraphToString.

// TODO: FIX THIS
@Ignore
@Test
public void testComputeQuerySubgraphToString() {
    ComputeQuery query = qb.compute().centrality().usingDegree().in("movie", "person");
    assertEquivalent(query, "compute centrality in movie, person; using degree;");
}
Also used : ComputeQuery(ai.grakn.graql.ComputeQuery) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 2 with ComputeQuery

use of ai.grakn.graql.ComputeQuery in project grakn by graknlabs.

the class QueryToStringTest method testClusterSizeToString.

@Test
public void testClusterSizeToString() {
    ComputeQuery query = qb.compute().cluster().usingConnectedComponent().in("movie", "person").clusterSize(10);
    assertEquivalent(query, "compute cluster in movie, person; size 10;");
}
Also used : ComputeQuery(ai.grakn.graql.ComputeQuery) Test(org.junit.Test)

Example 3 with ComputeQuery

use of ai.grakn.graql.ComputeQuery in project grakn by graknlabs.

the class QueryToStringTest method testClusterToString.

@Test
public void testClusterToString() {
    ComputeQuery query = qb.compute().cluster().usingConnectedComponent().in("movie", "person");
    assertEquivalent(query, "compute cluster in movie, person;");
}
Also used : ComputeQuery(ai.grakn.graql.ComputeQuery) Test(org.junit.Test)

Example 4 with ComputeQuery

use of ai.grakn.graql.ComputeQuery in project grakn by graknlabs.

the class QueryToStringTest method testDegreeOf.

// TODO: FIX THIS
@Ignore
@Test
public void testDegreeOf() {
    ComputeQuery query = qb.compute().centrality().usingDegree().in("movie", "person").of("person");
    assertEquivalent(query, "compute centrality of person in movie, person; using degree;");
}
Also used : ComputeQuery(ai.grakn.graql.ComputeQuery) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

ComputeQuery (ai.grakn.graql.ComputeQuery)4 Test (org.junit.Test)4 Ignore (org.junit.Ignore)2