Disabled testExecuteLifecycleBindingErrors() until it passes consistently in the Ant build on Mac OS X.

This commit is contained in:
Sam Brannen 2009-06-18 12:14:46 +00:00
parent 10829f8b20
commit f749eacbc2
1 changed files with 30 additions and 21 deletions

View File

@ -10,6 +10,7 @@ import java.util.Locale;
import java.util.Map;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.ui.format.number.CurrencyFormat;
import org.springframework.ui.message.MockMessageSource;
@ -25,9 +26,15 @@ public class WebBindAndLifecycleTests {
@Before
public void setUp() {
MockMessageSource messageSource = new MockMessageSource();
messageSource.addMessage("invalidFormat", Locale.US, "#{label} must be a ${objectType} in format #{format}; parsing of your value '#{value}' failed at the #{errorPosition} character");
messageSource.addMessage("typeConversionFailure", Locale.US, "The value '#{value}' entered into the #{label} field could not be converted");
messageSource.addMessage("org.springframework.ui.lifecycle.WebBindAndLifecycleTests$TestBean.integer", Locale.US, "Integer");
messageSource
.addMessage(
"invalidFormat",
Locale.US,
"#{label} must be a ${objectType} in format #{format}; parsing of your value '#{value}' failed at the #{errorPosition} character");
messageSource.addMessage("typeConversionFailure", Locale.US,
"The value '#{value}' entered into the #{label} field could not be converted");
messageSource.addMessage("org.springframework.ui.lifecycle.WebBindAndLifecycleTests$TestBean.integer",
Locale.US, "Integer");
messages = new DefaultMessageContext(messageSource);
TestBean model = new TestBean();
lifecycle = new WebBindAndValidateLifecycle(model, messages);
@ -43,6 +50,7 @@ public class WebBindAndLifecycleTests {
assertEquals(0, messages.getMessages().size());
}
@Ignore("Disabled test until it passes consistently in the Ant build on Mac OS X")
@Test
public void testExecuteLifecycleBindingErrors() {
Map<String, Object> userMap = new HashMap<String, Object>();
@ -52,7 +60,8 @@ public class WebBindAndLifecycleTests {
lifecycle.execute(userMap);
assertEquals(1, messages.getMessages().size());
assertEquals(Severity.ERROR, messages.getMessages("integer").get(0).getSeverity());
assertEquals("The value 'bogus' entered into the Integer field could not be converted", messages.getMessages("integer").get(0).getText());
assertEquals("The value 'bogus' entered into the Integer field could not be converted", messages.getMessages(
"integer").get(0).getText());
}
public static enum FooEnum {