Skip to content

Commit

Permalink
[RESTEASY-1240] Fixing TestSecureProcessingFeature test too (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
asoldano authored and ronsigal committed May 5, 2016
1 parent c25f663 commit a6f5e07
Showing 1 changed file with 11 additions and 3 deletions.
Expand Up @@ -486,7 +486,9 @@ void doDTDFails() throws Exception
//System.out.println("doDTDFails(): result: " + entity);
Assert.assertEquals(400, response.getStatus());
Assert.assertTrue(entity.startsWith("javax.xml.bind.UnmarshalException"));
Assert.assertTrue(entity.contains("DOCTYPE is disallowed"));
Assert.assertTrue(entity.contains("DOCTYPE"));
Assert.assertTrue(entity.contains("http://apache.org/xml/features/disallow-doctype-decl"));
Assert.assertTrue(entity.contains("true"));
}

void doDTDPasses() throws Exception
Expand All @@ -511,7 +513,10 @@ void doDTDFailsExternal() throws Exception
//System.out.println("doExternalDTDFails(): result: " + entity);
Assert.assertEquals(400, response.getStatus());
Assert.assertTrue(entity.startsWith("javax.xml.bind.UnmarshalException"));
Assert.assertTrue(entity.contains("External DTD: Failed to read external DTD "));
Assert.assertTrue(entity.contains("org.xml.sax.SAXParseException"));
if ("en".equals(System.getProperty("user.language"))) {
Assert.assertTrue(entity.contains("External DTD: Failed to read external DTD "));
}
}

void doMaxEntitiesFails() throws Exception
Expand Down Expand Up @@ -633,7 +638,10 @@ void doMaxAttributesFails() throws Exception
//System.out.println("doMaxAttributesFails() result: " + entity);
Assert.assertEquals(400, response.getStatus());
Assert.assertTrue(entity.startsWith("javax.xml.bind.UnmarshalException"));
Assert.assertTrue(entity.contains("has more than \"10,000\" attributes"));
Assert.assertTrue(entity.contains("JAXP00010002:"));
if ("en".equals(System.getProperty("user.language"))) {
Assert.assertTrue(entity.contains("has more than \"10,000\" attributes"));
}
}

void doMaxAttributesPasses() throws Exception
Expand Down

0 comments on commit a6f5e07

Please sign in to comment.