Package org.apache.myfaces.extensions.cdi.message.api

Examples of org.apache.myfaces.extensions.cdi.message.api.Message


public class SimpleMessageTest extends AbstractMessageContextAwareTest
{
    @Test
    public void createInlineMessageTest()
    {
        Message message = this.messageContext.message().text("hello open message").create();

        assertEquals("hello open message", message.toString(this.messageContext));
    }
View Full Code Here


    }

    @Test
    public void createInlineMessageViaMessageBuilderTest()
    {
        Message message = SimpleMessageBuilder.message().text("hello open message").create();

        assertEquals("hello open message", message.toString(this.messageContext));
    }
View Full Code Here

    }

    @Test
    public void createInlineMessageViaCustomMessageBuilderTest()
    {
        Message message = TestMessageBuilder.message().text("hello open message").create();

        assertEquals("hello open message", message.toString(this.messageContext));
    }
View Full Code Here

    }

    @Test
    public void resolveMessageTest()
    {
        Message message = this.messageContext.message().text("{hello}").create();

        checkDefaultHelloMessage(message.toString(this.messageContext));
    }
View Full Code Here

    }

    @Test
    public void resolveMessageTextTest()
    {
        Message message = this.messageContext.message().text("{hello}").create();

        @SuppressWarnings({"deprecation"})
        String messageText = message.toString(this.messageContext);

        checkDefaultHelloMessage(messageText);
    }
View Full Code Here

    }

    @Test
    public void directMessage2TextResolvingTest()
    {
        Message message = new DefaultMessage("inline message");

        assertEquals("inline message", message.toString());
    }
View Full Code Here

    }

    @Test
    public void manuallyCreateInlineMessageTest()
    {
        Message message = new DefaultMessage("inline message");

        assertEquals("inline message", message.toString(this.messageContext));
    }
View Full Code Here

    }

    @Test
    public void manuallyCreateMessageWithConfigTest()
    {
        Message message = manuallyCreateDefaultMessage();
        checkDefaultHelloMessage(message.toString());
    }
View Full Code Here

   }
   
    @Test
   public void createMessageWithHiddenArgumentsTest()
   {
       Message message = new TestMessage("{xyz123}").addArgument("123", 456, "789");

       assertEquals("???xyz123??? (123,456,789)", message.toString(this.messageContext));
   }
View Full Code Here

    }

    @Test
    public void directTextResolvingTest()
    {
        Message message = this.messageContext.message().text("{hello}").create();
        String messageText = message.toString(this.messageContext);

        checkDefaultHelloMessage(messageText);
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.cdi.message.api.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.