*/
public void testShouldIgnoreContent() throws Exception {
HTTPRequestOperationProcess process = (HTTPRequestOperationProcess)
createTestableProcess();
XMLPipelineContext context = process.getPipelineContext();
XMLPipelineConfiguration pipelineConfig =
context.getPipelineConfiguration();
WebDriverConfiguration config = (WebDriverConfiguration)pipelineConfig.
retrieveConfiguration(WebDriverConfiguration.class);
// Config ignore = true
// process ignore = not set
boolean ignore = process.shouldIgnoreContent(200);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(300);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(399);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(404);
assertTrue("Should ignore content.", ignore);
ignore = process.shouldIgnoreContent(304);
assertTrue("Should ignore content.", ignore);
// config ignore = false
// process ignore = not set
config.setIgnoreErroredContent(false);
ignore = process.shouldIgnoreContent(200);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(300);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(399);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(404);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(304);
assertTrue("Should ignore content.", ignore);
// config ignore = false
// process ignore = true
process.setIgnoreErroredContent("true");
ignore = process.shouldIgnoreContent(200);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(300);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(399);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(404);
assertTrue("Should ignore content.", ignore);
ignore = process.shouldIgnoreContent(304);
assertTrue("Should ignore content.", ignore);
// config ignore = true
// process ignore = true
config.setIgnoreErroredContent(true);
ignore = process.shouldIgnoreContent(200);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(300);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(399);
assertFalse("Should not ignore content.", ignore);
ignore = process.shouldIgnoreContent(404);
assertTrue("Should ignore content.", ignore);
ignore = process.shouldIgnoreContent(304);
assertTrue("Should ignore content.", ignore);
process = (HTTPRequestOperationProcess) createTestableProcess();
context = process.getPipelineContext();
pipelineConfig = context.getPipelineConfiguration();
config = (WebDriverConfiguration)pipelineConfig.
retrieveConfiguration(WebDriverConfiguration.class);
process.setIgnoreErroredContent("false");
// config ignore = true