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);
}
}
}
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);
}
}
}
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);
}
}
}
Aggregations