addPropertyWithPrivateSandboxStatus();
assertAllPropertiesArePublic();
}
private void setupTest() throws ApiException, IOException {
LumifyApi lumifyApi = login(USERNAME_TEST_USER_1);
addUserAuth(lumifyApi, USERNAME_TEST_USER_1, "A");
addUserAuth(lumifyApi, USERNAME_TEST_USER_1, "B");
addUserAuth(lumifyApi, USERNAME_TEST_USER_1, "C");
ClientApiArtifactImportResponse artifact = lumifyApi.getVertexApi().importFile("", "test.txt", new ByteArrayInputStream("Susan Feng knows Joe Ferner.".getBytes()));
assertEquals(1, artifact.getVertexIds().size());
assertNotNull(artifact.getVertexIds().get(0));
lumifyTestCluster.processGraphPropertyQueue();
ClientApiElement susanFengVertex = lumifyApi.getVertexApi().create(CONCEPT_TEST_PERSON, "");
susanFengVertexId = susanFengVertex.getId();
lumifyApi.getVertexApi().setProperty(susanFengVertexId, TEST_MULTI_VALUE_KEY, LumifyProperties.TITLE.getPropertyName(), "Susan Feng", "", "test", null, null);
lumifyTestCluster.processGraphPropertyQueue();
lumifyApi.getVertexApi().setProperty(susanFengVertexId, "key1", NAME_PROPERTY_IRI, "Joe", "A", "test", null, null);
lumifyApi.getVertexApi().setProperty(susanFengVertexId, "key2", NAME_PROPERTY_IRI, "Bob", "A", "test", null, null);
lumifyApi.getVertexApi().setProperty(susanFengVertexId, "key2", NAME_PROPERTY_IRI, "Sam", "B", "test", null, null);
assertPublishAll(lumifyApi, 17);
susanFengVertex = lumifyApi.getVertexApi().getByVertexId(susanFengVertexId);
assertEquals(SandboxStatus.PUBLIC, susanFengVertex.getSandboxStatus());
List<ClientApiProperty> properties = susanFengVertex.getProperties();
assertHasProperty(properties, "key1", NAME_PROPERTY_IRI, "Joe");
List<ClientApiProperty> key2Properties = getProperties(properties, "key2", NAME_PROPERTY_IRI);
assertEquals(2, key2Properties.size());
assertEquals("Bob", key2Properties.get(0).getValue());
assertEquals("Sam", key2Properties.get(1).getValue());
assertEquals(SandboxStatus.PUBLIC, key2Properties.get(0).getSandboxStatus());
assertEquals(SandboxStatus.PUBLIC, key2Properties.get(1).getSandboxStatus());
for (ClientApiProperty property : properties) {
assertEquals(SandboxStatus.PUBLIC, property.getSandboxStatus());
}
lumifyApi.logout();
}