use of ai.grakn.engine.controller.response.AttributeType in project grakn by graknlabs.
the class ConceptControllerTest method whenGettingKeysOfType_EnsureAttributesAreReturned.
@Test
public void whenGettingKeysOfType_EnsureAttributesAreReturned() throws IOException {
Response response = RestAssured.when().get(entityTypeWrapper.keys().id());
assertEquals(SC_OK, response.getStatusCode());
AttributeType[] keys = response.jsonPath().getObject("keys", AttributeType[].class);
assertThat(keys, arrayContainingInAnyOrder(attributeTypeKeyWrapper));
}
use of ai.grakn.engine.controller.response.AttributeType in project grakn by graknlabs.
the class ConceptControllerTest method whenGettingAttributesOfType_EnsureAttributesAreReturned.
@Test
public void whenGettingAttributesOfType_EnsureAttributesAreReturned() throws IOException {
Response response = RestAssured.when().get(entityTypeWrapper.attributes().id());
assertEquals(SC_OK, response.getStatusCode());
AttributeType[] attributes = response.jsonPath().getObject("attributes", AttributeType[].class);
assertThat(attributes, arrayContainingInAnyOrder(attributeTypeWrapper, attributeTypeKeyWrapper));
}
Aggregations