Remove Java 6 litter

This commit is contained in:
Andrew Gaul 2014-08-10 12:08:52 -07:00
parent fecedfdb3f
commit a10bf3e9c5
2 changed files with 0 additions and 36 deletions

View File

@ -52,11 +52,6 @@ public class ParseSaxTest extends BaseHandlerTest {
ParseSax<String> createParser() {
return factory.create(injector.getInstance(TestHandler.class));
}
@DataProvider
public Object[][] runUnderJava6() {
return TestUtils.isJava6() ? SINGLE_NO_ARG_INVOCATION : NO_INVOCATIONS;
}
@DataProvider
public Object[][] runUnderJava7() {
@ -132,32 +127,6 @@ public class ParseSaxTest extends BaseHandlerTest {
}
}
@Test(dataProvider = "runUnderJava6")
public void testAddDetailsAndPropagateOkWithValidRequestResponseWithSAXParseException() throws ExecutionException,
InterruptedException, TimeoutException, IOException {
ParseSax<String> parser = createParser();
HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://foohost").build();
HttpResponse response = HttpResponse.builder().statusCode(304).message("Not Modified").build();
Locator locator = createMock(Locator.class);
expect(locator.getColumnNumber()).andReturn(1);
expect(locator.getLineNumber()).andReturn(1);
expect(locator.getPublicId()).andReturn("publicId");
expect(locator.getSystemId()).andReturn("systemId");
replay(locator);
Exception input = new SAXParseException("foo", locator);
verify(locator);
try {
parser.setContext(request);
parser.addDetailsAndPropagate(response, input);
} catch (RuntimeException e) {
assertEquals(e.getMessage(),
"request: GET http://foohost HTTP/1.1; response: HTTP/1.1 304 Not Modified; error at 1:1 in document systemId; cause: org.xml.sax.SAXParseException: foo");
assertEquals(e.getCause(), input);
}
}
@Test(dataProvider = "runUnderJava7")
public void testAddDetailsAndPropagateOkWithValidRequestResponseWithSAXParseException_java7() throws ExecutionException,
InterruptedException, TimeoutException, IOException {

View File

@ -29,11 +29,6 @@ public class TestUtils {
public static final Object[][] NO_INVOCATIONS = new Object[0][0];
public static final Object[][] SINGLE_NO_ARG_INVOCATION = { new Object[0] };
public static boolean isJava6() {
System.out.println(System.getProperty("java.version", "None??"));
return System.getProperty("java.version", "").contains("1.6.");
}
public static boolean isJava7() {
System.out.println(System.getProperty("java.version", "None??"));
return System.getProperty("java.version", "").contains("1.7.");