From: Michael Vorburger Date: Mon, 28 May 2018 16:33:14 +0000 (+0200) Subject: reduce copy/paste between HttpUtils's test_create() methods X-Git-Tag: release/fluorine~30 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=f11a4afe7fa95b525929bac0b8f9941564aa0ab1;p=neutron.git reduce copy/paste between HttpUtils's test_create() methods Change-Id: I2eed44ead7b7b05f6b178c5a0b34b9641c223615 Signed-off-by: Michael Vorburger --- diff --git a/integration/test-standalone/src/main/java/org/opendaylight/neutron/e2etest/HttpUtils.java b/integration/test-standalone/src/main/java/org/opendaylight/neutron/e2etest/HttpUtils.java index 0472334d0..c3b5b6334 100644 --- a/integration/test-standalone/src/main/java/org/opendaylight/neutron/e2etest/HttpUtils.java +++ b/integration/test-standalone/src/main/java/org/opendaylight/neutron/e2etest/HttpUtils.java @@ -67,13 +67,7 @@ public final class HttpUtils { } static void test_create(String urlStr, String content, String context) { - try { - URL url = new URL(urlStr); - HttpURLConnection httpConn = httpURLConnectionFactoryPost(url, content); - Assert.assertEquals(context, 201, httpConn.getResponseCode()); - } catch (IOException e) { - throw new UncheckedIOException(e); - } + test_create(urlStr, 201, content, context); } static void test_create(String urlStr, int responseCode, String content, String context) {