* Test parsing of a request without dn and newrdn attributes
*/
@Test
public void testRequestWithDnAndNewRdnAttributes()
{
Dsmlv2Parser parser = null;
try
{
parser = newParser();
parser.setInput( ModifyDNRequestTest.class.getResource( "request_with_dn_and_newrdn_attributes.xml" )
.openStream(), "UTF-8" );
parser.parse();
}
catch ( Exception e )
{
fail( e.getMessage() );
}
ModifyDnRequest modifyDNRequest = ( ModifyDnRequest ) parser.getBatchRequest().getCurrentRequest();
assertEquals( "cn=Bob Rush,ou=Dev,dc=Example,dc=COM", modifyDNRequest.getName().getNormName() );
assertEquals( "CN=Steve Jobs", modifyDNRequest.getNewRdn().getName() );
}