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

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


    }

    @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}", "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

    }

    @Test
    public void customMessageTypeViaCustomMessageBuilder1Test()
    {
        Message message = TestMessageBuilder.label().text("{hello}").create();

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

    }

    @Test
    public void customMessageTypeViaCustomMessageBuilder2Test()
    {
        Message message = TestMessageBuilder.technicalMessage().text("{hello}").create();

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

    }

    @Test
    public void newMessageFactoryTestViaMessageContext()
    {
        Message message = DefaultMessageContext.create(new TestMessageFactory()).message().text("{hello}").create();

        assertEquals(TestMessage.class, message.getClass());
    }
View Full Code Here

    }

    @Test
    public void newMessageFactoryTestViaMessageBuilder()
    {
        Message message = SimpleMessageBuilder.message(new TestMessageFactory()).text("{hello}").create();

        assertEquals(TestMessage.class, message.getClass());
    }
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.