package test.at.gv.egovernment.moa.id.auth.builder;
import at.gv.egovernment.moa.id.auth.builder.CreateXMLSignatureRequestBuilder;
import test.at.gv.egovernment.moa.id.UnitTestCase;
/**
* @author Paul Ivancsics
* @version $Id$
*/
public class CreateXMLSignatureBuilderTest extends UnitTestCase {
private static final String nl = "\n";
public static final String TRANSFORMS_INFO =
" " + nl +
" " + nl +
" " + nl +
" " + nl +
"" + nl +
"" + nl +
"" + nl +
"" + nl +
"" + nl +
"" + nl +
"" + nl +
"" + nl +
" " + nl +
" " + nl +
" " + nl +
" text/html" + nl +
" " + nl +
" " + nl;
public static final String REQUEST_SHOULD =
"" + nl +
"" + nl +
" SecureSignatureKeypair" + nl +
" " + nl +
" " + nl +
TRANSFORMS_INFO +
" " + nl +
" " + nl +
" " + nl +
" " + AuthenticationBlockAssertionBuilderTest.ASSERTION_SHOULD + "" + nl +
" " + nl +
" /saml:Assertion" + nl +
" " + nl +
"";
public CreateXMLSignatureBuilderTest(String name) {
super(name);
}
public void testBuild() throws Exception {
String request = new CreateXMLSignatureRequestBuilder().build(
AuthenticationBlockAssertionBuilderTest.ASSERTION_SHOULD, "SecureSignatureKeypair",
new String[] {TRANSFORMS_INFO});
assertXmlEquals(REQUEST_SHOULD, request);
}
}