use of io.jans.scim.model.scim2.Validations in project atlasmap by atlasmap.
the class AtlasCoreValidationTest method testXmlToJson.
@Test
public void testXmlToJson() throws AtlasException {
assertNotNull(context);
assertNotNull(session);
context.processValidation(session);
Validations validations = session.getValidations();
assertNotNull(validations);
assertNotNull(validations.getValidation());
assertTrue(validations.getValidation().isEmpty());
}
use of io.jans.scim.model.scim2.Validations in project atlasmap by atlasmap.
the class AtlasCoreValidationTest method testJsonToXml.
@Test
public void testJsonToXml() throws AtlasException {
assertNotNull(context);
assertNotNull(session);
context.processValidation(session);
Validations validations = session.getValidations();
assertNotNull(validations);
assertNotNull(validations.getValidation());
assertTrue(validations.getValidation().isEmpty());
}
use of io.jans.scim.model.scim2.Validations in project atlasmap by atlasmap.
the class AtlasService method validateMapping.
/**
* Performs mapping validation.
* @param mappingDefinitionId mapping definition ID
* @param mapping mapping
* @param uriInfo URI info
* @return {@link Validations} validation result
* @throws IOException unexpected error
* @throws AtlasException unexpected error
*/
protected Response validateMapping(Integer mappingDefinitionId, AtlasMapping mapping, UriInfo uriInfo) throws IOException, AtlasException {
AtlasSession session;
synchronized (atlasContextFactory) {
AtlasContext context = atlasContextFactory.createContext(mapping);
session = context.createSession();
context.processValidation(session);
}
Validations validations = session.getValidations();
if (session.getValidations() == null) {
validations = new Validations();
}
return Response.ok().entity(toJson(validations)).build();
}
use of io.jans.scim.model.scim2.Validations in project atlasmap by atlasmap.
the class DefaultAtlasSessionTest method testGetSetValidations.
@Test
public void testGetSetValidations() {
assertNotNull(session.getValidations());
assertNotNull(session.getValidations().getValidation());
assertTrue(session.getValidations().getValidation().size() == 0);
Validations validations = new Validations();
Validation validation = new Validation();
validation.setScope(ValidationScope.MAPPING);
validation.setId("bar");
validations.getValidation().add(validation);
session.setValidations(validations);
assertNotNull(session.getValidations());
assertNotNull(session.getValidations().getValidation());
assertTrue(session.getValidations().getValidation().size() == 1);
}
use of io.jans.scim.model.scim2.Validations in project atlasmap by atlasmap.
the class AtlasCoreValidationTest method testJavaToXml.
@Test
public void testJavaToXml() throws AtlasException {
assertNotNull(context);
assertNotNull(session);
context.processValidation(session);
Validations validations = session.getValidations();
assertNotNull(validations);
assertNotNull(validations.getValidation());
assertTrue(validations.getValidation().isEmpty());
}
Aggregations