Search in sources :

Example 16 with Validations

use of org.gluu.oxtrust.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());
}
Also used : Validations(io.atlasmap.v2.Validations) Test(org.junit.Test) AtlasMappingBaseTest(io.atlasmap.validation.AtlasMappingBaseTest)

Example 17 with Validations

use of org.gluu.oxtrust.model.scim2.Validations in project atlasmap by atlasmap.

the class AtlasCoreValidationTest method testMappingNameNull.

@Test
public void testMappingNameNull() throws AtlasException {
    assertNotNull(context);
    assertNotNull(session);
    context.processValidation(session);
    Validations validations = session.getValidations();
    assertNotNull(validations);
    assertNotNull(validations.getValidation());
    assertFalse(validations.getValidation().isEmpty());
    boolean found = false;
    for (Validation v : validations.getValidation()) {
        if ("Mapping name must not be null nor empty".equals(v.getMessage())) {
            found = true;
            assertEquals(ValidationStatus.ERROR, v.getStatus());
            assertEquals(ValidationScope.ALL, v.getScope());
        }
        System.out.println(AtlasValidationTestHelper.validationToString(v));
    }
    assertTrue(found);
}
Also used : Validation(io.atlasmap.v2.Validation) Validations(io.atlasmap.v2.Validations) Test(org.junit.Test) AtlasMappingBaseTest(io.atlasmap.validation.AtlasMappingBaseTest)

Example 18 with Validations

use of org.gluu.oxtrust.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());
}
Also used : Validations(io.atlasmap.v2.Validations) Test(org.junit.Test) AtlasMappingBaseTest(io.atlasmap.validation.AtlasMappingBaseTest)

Example 19 with Validations

use of org.gluu.oxtrust.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());
}
Also used : Validations(io.atlasmap.v2.Validations) Test(org.junit.Test) AtlasMappingBaseTest(io.atlasmap.validation.AtlasMappingBaseTest)

Example 20 with Validations

use of org.gluu.oxtrust.model.scim2.Validations in project atlasmap by atlasmap.

the class AtlasCoreValidationTest method testXmlToJava.

@Test
public void testXmlToJava() throws AtlasException {
    assertNotNull(context);
    assertNotNull(session);
    context.processValidation(session);
    Validations validations = session.getValidations();
    assertNotNull(validations);
    assertNotNull(validations.getValidation());
    assertTrue(validations.getValidation().isEmpty());
}
Also used : Validations(io.atlasmap.v2.Validations) Test(org.junit.Test) AtlasMappingBaseTest(io.atlasmap.validation.AtlasMappingBaseTest)

Aggregations

Validations (io.atlasmap.v2.Validations)15 Test (org.junit.Test)11 AtlasMappingBaseTest (io.atlasmap.validation.AtlasMappingBaseTest)8 Validation (io.atlasmap.v2.Validation)5 SCIMException (org.gluu.oxtrust.model.exception.SCIMException)4 AtlasSession (io.atlasmap.api.AtlasSession)3 Audits (io.atlasmap.v2.Audits)3 InvalidAttributeValueException (javax.management.InvalidAttributeValueException)3 ApiOperation (com.wordnik.swagger.annotations.ApiOperation)2 AtlasContext (io.atlasmap.api.AtlasContext)2 File (java.io.File)2 URI (java.net.URI)2 Consumes (javax.ws.rs.Consumes)2 DefaultValue (javax.ws.rs.DefaultValue)2 HeaderParam (javax.ws.rs.HeaderParam)2 Path (javax.ws.rs.Path)2 Produces (javax.ws.rs.Produces)2 Response (javax.ws.rs.core.Response)2 ListResponse (org.gluu.oxtrust.model.scim2.ListResponse)2 Extension (org.gluu.oxtrust.model.scim2.extensions.Extension)2