Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 449CB200C3A for ; Fri, 31 Mar 2017 18:26:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4352D160B79; Fri, 31 Mar 2017 16:26:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 63A7F160B8C for ; Fri, 31 Mar 2017 18:25:59 +0200 (CEST) Received: (qmail 51250 invoked by uid 500); 31 Mar 2017 16:25:58 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 51002 invoked by uid 99); 31 Mar 2017 16:25:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2017 16:25:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6A764E1103; Fri, 31 Mar 2017 16:25:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: sergeyb@apache.org To: commits@cxf.apache.org Date: Fri, 31 Mar 2017 16:26:00 -0000 Message-Id: <51b3c05c2ae74e44b429aed64004ce19@git.apache.org> In-Reply-To: <49d38e1486484649b3db75373e46ad49@git.apache.org> References: <49d38e1486484649b3db75373e46ad49@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/3] cxf git commit: [CXF-7304] Adding a test archived-at: Fri, 31 Mar 2017 16:26:00 -0000 [CXF-7304] Adding a test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/32626897 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/32626897 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/32626897 Branch: refs/heads/3.0.x-fixes Commit: 3262689738f01b62321915954c5516382e55cf38 Parents: e9e341c Author: Sergey Beryozkin Authored: Fri Mar 31 17:22:18 2017 +0100 Committer: Sergey Beryozkin Committed: Fri Mar 31 17:25:41 2017 +0100 ---------------------------------------------------------------------- .../cxf/systest/jaxrs/JAXRSUnicodeTest.java | 71 ++++++++++++++++++++ .../resources/jaxrs_unicode/WEB-INF/beans.xml | 35 ++++++++++ .../resources/jaxrs_unicode/WEB-INF/web.xml | 45 +++++++++++++ 3 files changed, 151 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/32626897/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUnicodeTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUnicodeTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUnicodeTest.java new file mode 100644 index 0000000..6f7fd30 --- /dev/null +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSUnicodeTest.java @@ -0,0 +1,71 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.cxf.systest.jaxrs; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; + +import org.apache.cxf.jaxrs.client.WebClient; +import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +public class JAXRSUnicodeTest extends AbstractBusClientServerTestBase { + public static final int PORT = SpringServer.PORT; + + @BeforeClass + public static void beforeClass() throws Exception { + // must be 'in-process' to communicate with inner class in single JVM + // and to spawn class SpringServer w/o using main() method + launchServer(SpringServer.class, true); + } + @Ignore + public static class SpringServer extends AbstractSpringServer { + public static final int PORT = allocatePortAsInt(SpringServer.class); + public SpringServer() { + super("/jaxrs_unicode", PORT); + } + } + + + @Test + public void testGetHelloMessage() { + WebClient wc = WebClient.create("http://localhost:" + PORT + "/кирилица"); + WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L); + wc.accept("text/plain"); + assertEquals("Hello", wc.get(String.class)); + } + + @Ignore + @Path("/") + public static class Resource { + + @GET + @Produces("text/plain") + public String getHello() { + return "Hello"; + } + + } + +} + http://git-wip-us.apache.org/repos/asf/cxf/blob/32626897/systests/jaxrs/src/test/resources/jaxrs_unicode/WEB-INF/beans.xml ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/resources/jaxrs_unicode/WEB-INF/beans.xml b/systests/jaxrs/src/test/resources/jaxrs_unicode/WEB-INF/beans.xml new file mode 100644 index 0000000..5b922e1 --- /dev/null +++ b/systests/jaxrs/src/test/resources/jaxrs_unicode/WEB-INF/beans.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/cxf/blob/32626897/systests/jaxrs/src/test/resources/jaxrs_unicode/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/resources/jaxrs_unicode/WEB-INF/web.xml b/systests/jaxrs/src/test/resources/jaxrs_unicode/WEB-INF/web.xml new file mode 100644 index 0000000..a8cae3f --- /dev/null +++ b/systests/jaxrs/src/test/resources/jaxrs_unicode/WEB-INF/web.xml @@ -0,0 +1,45 @@ + + + + + + + contextConfigLocation + WEB-INF/beans.xml + + + + org.springframework.web.context.ContextLoaderListener + + + + CXFServlet + CXF Servlet + + org.apache.cxf.transport.servlet.CXFServlet + + 1 + + + CXFServlet + /* + + +