myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gpetra...@apache.org
Subject svn commit: r936066 - in /myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test: SimpleMessageTest.java TestMessage.java
Date Tue, 20 Apr 2010 21:22:11 GMT
Author: gpetracek
Date: Tue Apr 20 21:22:11 2010
New Revision: 936066

URL: http://svn.apache.org/viewvc?rev=936066&view=rev
Log:
EXTCDI-21 cleanup

Added:
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/TestMessage.java
Modified:
    myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java

Modified: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java?rev=936066&r1=936065&r2=936066&view=diff
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java
(original)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/SimpleMessageTest.java
Tue Apr 20 21:22:11 2010
@@ -114,9 +114,9 @@ public class SimpleMessageTest extends A
     @Test
    public void createMessageWithHiddenArgumentsTest()
    {
-       String messageText = this.messageContext.message().text("{xyz123}").argument(new String[]{"123",
"456", "789"}).toText();
+       Message message = new TestMessage("{xyz123}", "123", 456, "789");
 
-       assertEquals("???xyz123??? (123,456,789)", messageText);
+       assertEquals("???xyz123??? (123,456,789)", message.toString(this.messageContext));
    }
 
     @Test

Added: myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/TestMessage.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/TestMessage.java?rev=936066&view=auto
==============================================================================
--- myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/TestMessage.java
(added)
+++ myfaces/extensions/cdi/trunk/jse-modules/message-module/impl/src/test/java/org/apache/myfaces/extensions/cdi/message/test/TestMessage.java
Tue Apr 20 21:22:11 2010
@@ -0,0 +1,54 @@
+/*
+ * 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.myfaces.extensions.cdi.message.test;
+
+import org.apache.myfaces.extensions.cdi.message.api.Message;
+import org.apache.myfaces.extensions.cdi.message.api.NamedArgument;
+import org.apache.myfaces.extensions.cdi.message.api.payload.MessagePayload;
+import org.apache.myfaces.extensions.cdi.message.impl.DefaultMessage;
+
+import java.util.Set;
+
+class TestMessage extends DefaultMessage
+{
+    public TestMessage(Message message)
+    {
+        super(message);
+    }
+
+    public TestMessage(String messageTemplate, Object... arguments)
+    {
+        super(messageTemplate, arguments);
+    }
+
+    public TestMessage(String messageTemplate, Set<NamedArgument> namedArguments)
+    {
+        super(messageTemplate, namedArguments);
+    }
+
+    public TestMessage(String messageTemplate, Class<? extends MessagePayload> severity,
Object... arguments)
+    {
+        super(messageTemplate, severity, arguments);
+    }
+
+    public TestMessage(String messageTemplate, Class<? extends MessagePayload> severity,
Set<NamedArgument> namedArguments)
+    {
+        super(messageTemplate, severity, namedArguments);
+    }
+}



Mime
View raw message