636465666768697071727374
} @Test public void resolveMessageTextTest() { Message message = this.messageContext.message().text("{hello}").create(); @SuppressWarnings({"deprecation"}) String messageText = message.toString(this.messageContext); checkDefaultHelloMessage(messageText); }
848586878889909192
} @Test public void directMessage2TextResolvingTest() { Message message = new DefaultMessage("inline message"); assertEquals("inline message", message.toString()); }
9293949596979899100
} @Test public void manuallyCreateInlineMessageTest() { Message message = new DefaultMessage("inline message"); assertEquals("inline message", message.toString(this.messageContext)); }
100101102103104105106107
} @Test public void manuallyCreateMessageWithConfigTest() { Message message = manuallyCreateDefaultMessage(); checkDefaultHelloMessage(message.toString()); }
128129130131132133134135136
} @Test public void createMessageWithHiddenArgumentsTest() { Message message = new TestMessage("{xyz123}", "123", 456, "789"); assertEquals("???xyz123??? (123,456,789)", message.toString(this.messageContext)); }
144145146147148149150151152153
} @Test public void directTextResolvingTest() { Message message = this.messageContext.message().text("{hello}").create(); String messageText = message.toString(this.messageContext); checkDefaultHelloMessage(messageText); }
454647484950515253
} @Test public void customMessageTypeViaCustomMessageBuilder1Test() { Message message = TestMessageBuilder.label().text("{hello}").create(); assertEquals("test label", message.toString(this.messageContext)); }
535455565758596061
} @Test public void customMessageTypeViaCustomMessageBuilder2Test() { Message message = TestMessageBuilder.technicalMessage().text("{hello}").create(); assertEquals("hello codi", message.toString(this.messageContext)); }
697071727374757677
} @Test public void newMessageFactoryTestViaMessageContext() { Message message = DefaultMessageContext.create(new TestMessageFactory()).message().text("{hello}").create(); assertEquals(TestMessage.class, message.getClass()); }
777879808182838485
} @Test public void newMessageFactoryTestViaMessageBuilder() { Message message = SimpleMessageBuilder.message(new TestMessageFactory()).text("{hello}").create(); assertEquals(TestMessage.class, message.getClass()); }