Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 95B6A181D4 for ; Mon, 24 Aug 2015 13:26:44 +0000 (UTC) Received: (qmail 89688 invoked by uid 500); 24 Aug 2015 13:26:44 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 89623 invoked by uid 500); 24 Aug 2015 13:26:44 -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 89614 invoked by uid 99); 24 Aug 2015 13:26:44 -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; Mon, 24 Aug 2015 13:26:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 28E4AE060C; Mon, 24 Aug 2015 13:26:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Message-Id: <01954946b11644009fe44e9d269bd3d8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cxf git commit: Fixing some test assertions with a non-english locale Date: Mon, 24 Aug 2015 13:26:44 +0000 (UTC) Repository: cxf Updated Branches: refs/heads/master c9129aff7 -> 673ca406c Fixing some test assertions with a non-english locale Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/673ca406 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/673ca406 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/673ca406 Branch: refs/heads/master Commit: 673ca406cd9725a0e5e4891ab9d54df0c4881600 Parents: c9129af Author: Colm O hEigeartaigh Authored: Mon Aug 24 14:26:25 2015 +0100 Committer: Colm O hEigeartaigh Committed: Mon Aug 24 14:26:25 2015 +0100 ---------------------------------------------------------------------- .../cxf/jaxrs/provider/JAXBElementProviderTest.java | 5 ++++- .../jaxws/SchemaValidationClientServerTest.java | 15 ++++++++++++--- .../apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java | 5 ++++- 3 files changed, 20 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/673ca406/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java ---------------------------------------------------------------------- diff --git a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java index 0249fd0..d4a1753 100644 --- a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java +++ b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/JAXBElementProviderTest.java @@ -1353,7 +1353,10 @@ public class JAXBElementProviderTest extends Assert { fail("Validation exception expected"); } catch (Exception ex) { Throwable cause = ex.getCause(); - assertTrue(cause.getMessage().contains("Cannot find the declaration of element")); + boolean english = "en".equals(java.util.Locale.getDefault().getLanguage()); + if (english) { + assertTrue(cause.getMessage().contains("Cannot find the declaration of element")); + } } } http://git-wip-us.apache.org/repos/asf/cxf/blob/673ca406/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java ---------------------------------------------------------------------- diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java index d261d96..c3359c2 100644 --- a/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java +++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/SchemaValidationClientServerTest.java @@ -113,7 +113,10 @@ public class SchemaValidationClientServerTest extends AbstractBusClientServerTes fail("should catch marshall exception as the invalid outgoing message per schema"); } catch (Exception e) { assertTrue(e.getMessage().contains("Marshalling Error")); - assertTrue(e.getMessage().contains("is not facet-valid with respect to pattern")); + boolean english = "en".equals(java.util.Locale.getDefault().getLanguage()); + if (english) { + assertTrue(e.getMessage().contains("is not facet-valid with respect to pattern")); + } } try { @@ -126,7 +129,10 @@ public class SchemaValidationClientServerTest extends AbstractBusClientServerTes fail("should catch marshall exception as the invalid outgoing message per schema"); } catch (Exception e) { assertTrue(e.getMessage().contains("Marshalling Error")); - assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength")); + boolean english = "en".equals(java.util.Locale.getDefault().getLanguage()); + if (english) { + assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength")); + } } try { @@ -140,7 +146,10 @@ public class SchemaValidationClientServerTest extends AbstractBusClientServerTes fail("should catch marshall exception as the invalid outgoing message per schema"); } catch (Exception e) { assertTrue(e.getMessage().contains("Could not validate soapheader ")); - assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength")); + boolean english = "en".equals(java.util.Locale.getDefault().getLanguage()); + if (english) { + assertTrue(e.getMessage().contains("is not facet-valid with respect to maxLength")); + } } } http://git-wip-us.apache.org/repos/asf/cxf/blob/673ca406/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java ---------------------------------------------------------------------- diff --git a/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java b/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java index 84af561..1c57554 100644 --- a/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java +++ b/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java @@ -1262,9 +1262,12 @@ public class CodeGenTest extends AbstractCodeGenTest { processor.setContext(env); processor.execute(); } catch (Exception e) { - assertTrue("Jaxb databinding can not find the schema error ", + boolean english = "en".equals(java.util.Locale.getDefault().getLanguage()); + if (english) { + assertTrue("Jaxb databinding can not find the schema error ", e.getLocalizedMessage().indexOf(" cos-st-restricts.1.1: " + "The type 'TpAny' is atomic") > -1); + } } }