Search in sources :

Example 1 with IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException

use of org.wso2.carbon.identity.application.mgt.defaultsequence.stub.IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException in project product-is by wso2.

the class DefaultAuthSeqManagementTestCase method testCreateDefaultAuthSeqWithIncorrectContent.

@Test(alwaysRun = true, description = "Testing create default authentication sequence with invalid content")
public void testCreateDefaultAuthSeqWithIncorrectContent() {
    try {
        DefaultAuthenticationSequence sequence = getDefaultAuthSeq(seqName, null, seqContent3, null);
        defaultAuthSeqMgtServiceClient.createDefaultAuthenticationSeq(sequence);
        DefaultAuthenticationSequence receivedSequence = defaultAuthSeqMgtServiceClient.getDefaultAuthenticationSeqInXML();
        assertNull(receivedSequence, "Successfully retrieve the tenant default auth sequence with " + "incorrect content");
    } catch (IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException e) {
        if (ArrayUtils.isEmpty(e.getFaultMessage().getDefaultAuthSeqMgtException().getMessages())) {
            fail("Error while trying to create default authentication sequence with incorrect content.", e);
        }
    }
}
Also used : IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException(org.wso2.carbon.identity.application.mgt.defaultsequence.stub.IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException) DefaultAuthenticationSequence(org.wso2.carbon.identity.application.common.model.xsd.DefaultAuthenticationSequence) Test(org.testng.annotations.Test) ISIntegrationTest(org.wso2.identity.integration.common.utils.ISIntegrationTest)

Example 2 with IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException

use of org.wso2.carbon.identity.application.mgt.defaultsequence.stub.IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException in project product-is by wso2.

the class DefaultAuthSeqManagementTestCase method testCreateDefaultAuthSeqWithInvalidContent.

@Test(alwaysRun = true, description = "Testing create default authentication sequence with invalid content")
public void testCreateDefaultAuthSeqWithInvalidContent() {
    try {
        DefaultAuthenticationSequence sequence = getDefaultAuthSeq(seqName, null, seqContent2, null);
        defaultAuthSeqMgtServiceClient.createDefaultAuthenticationSeq(sequence);
        DefaultAuthenticationSequence receivedSequence = defaultAuthSeqMgtServiceClient.getDefaultAuthenticationSeqInXML();
        assertNull(receivedSequence, "Successfully retrieve the tenant default auth sequence with " + "invalid content");
    } catch (IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException e) {
        if (ArrayUtils.isEmpty(e.getFaultMessage().getDefaultAuthSeqMgtException().getMessages())) {
            fail("Error while trying to create default authentication sequence with invalid content.", e);
        }
    }
}
Also used : IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException(org.wso2.carbon.identity.application.mgt.defaultsequence.stub.IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException) DefaultAuthenticationSequence(org.wso2.carbon.identity.application.common.model.xsd.DefaultAuthenticationSequence) Test(org.testng.annotations.Test) ISIntegrationTest(org.wso2.identity.integration.common.utils.ISIntegrationTest)

Example 3 with IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException

use of org.wso2.carbon.identity.application.mgt.defaultsequence.stub.IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException in project product-is by wso2.

the class DefaultAuthSeqManagementTestCase method testCreateDefaultAuthSeqWithInvalidXMLElement.

@Test(alwaysRun = true, description = "Testing create default authentication sequence with invalid content")
public void testCreateDefaultAuthSeqWithInvalidXMLElement() {
    try {
        DefaultAuthenticationSequence sequence = getDefaultAuthSeq(seqName, null, seqContent4, null);
        defaultAuthSeqMgtServiceClient.createDefaultAuthenticationSeq(sequence);
        DefaultAuthenticationSequence receivedSequence = defaultAuthSeqMgtServiceClient.getDefaultAuthenticationSeqInXML();
        assertNull(receivedSequence, "Successfully retrieve the tenant default auth sequence with " + "invalid XML element");
    } catch (IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException e) {
        if (e.getFaultMessage() != null && e.getFaultMessage().getDefaultAuthSeqMgtException() != null && ArrayUtils.isEmpty(e.getFaultMessage().getDefaultAuthSeqMgtException().getMessages())) {
            fail("Error while trying to create default authentication sequence with " + "invalid XML element.", e);
        }
    }
}
Also used : IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException(org.wso2.carbon.identity.application.mgt.defaultsequence.stub.IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException) DefaultAuthenticationSequence(org.wso2.carbon.identity.application.common.model.xsd.DefaultAuthenticationSequence) Test(org.testng.annotations.Test) ISIntegrationTest(org.wso2.identity.integration.common.utils.ISIntegrationTest)

Aggregations

Test (org.testng.annotations.Test)3 DefaultAuthenticationSequence (org.wso2.carbon.identity.application.common.model.xsd.DefaultAuthenticationSequence)3 IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException (org.wso2.carbon.identity.application.mgt.defaultsequence.stub.IdentityDefaultSeqManagementServiceDefaultAuthSeqMgtException)3 ISIntegrationTest (org.wso2.identity.integration.common.utils.ISIntegrationTest)3