@Test public void testInfoErrorMessage() { final String messageText = "MESSAGE"; final String context = "CONTEXT"; IValidationMessage message = ValidationMessage.infoError(messageText); Assert.assertEquals(messageText, message.getText()); Assert.assertNull(message.getContext()); testWithContext(message); message = ValidationMessage.infoError(context, messageText); Assert.assertEquals(messageText, message.getText()); Assert.assertEquals(context, message.getContext()); }
public static IValidationMessage infoError(final String context, final String text) { return create(MessageType.INFO_ERROR, context, text); }
ValidationMessage { public static IValidationMessage infoError(final String context, final String text) { return create(MessageType.INFO_ERROR, context, text); } }
ValidationMessage { public static IValidationMessage infoError(final String context, final String text) { return create(MessageType.INFO_ERROR, context, text); } private  ValidationMessage(); }
ValidationMessage { public static IValidationMessage infoError(final String context, final String text) { return create(MessageType.INFO_ERROR, context, text); } private  ValidationMessage(); static IValidationMessage ok(); static IValidationMessage create(final MessageType type, final String context, final String text); static IValidationMessage create(final MessageType type, final String text); static IValidationMessage error(final String context, final String text); static IValidationMessage error(final String message); static IValidationMessage infoError(final String context, final String text); static IValidationMessage infoError(final String text); static IValidationMessage warning(final String context, final String text); static IValidationMessage warning(final String text); static IValidationMessage info(final String context, final String text); static IValidationMessage info(final String text); }
ValidationMessage { public static IValidationMessage infoError(final String context, final String text) { return create(MessageType.INFO_ERROR, context, text); } private  ValidationMessage(); static IValidationMessage ok(); static IValidationMessage create(final MessageType type, final String context, final String text); static IValidationMessage create(final MessageType type, final String text); static IValidationMessage error(final String context, final String text); static IValidationMessage error(final String message); static IValidationMessage infoError(final String context, final String text); static IValidationMessage infoError(final String text); static IValidationMessage warning(final String context, final String text); static IValidationMessage warning(final String text); static IValidationMessage info(final String context, final String text); static IValidationMessage info(final String text);  }