Moved Spring Web Flow to a top level project
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
log4j.rootCategory=WARN, stdout
|
||||
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
|
||||
|
||||
# Enable web flow logging
|
||||
log4j.category.org.springframework.webflow=DEBUG
|
||||
log4j.category.org.springframework.binding=DEBUG
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2002-2006 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.webflow.samples.birthdate;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.validation.BindException;
|
||||
|
||||
public class BirthdateValidatorTests extends TestCase {
|
||||
|
||||
public void testValidateCardForm() throws Exception {
|
||||
BirthDateValidator validator = new BirthDateValidator();
|
||||
BirthDate birthDate = new BirthDate();
|
||||
birthDate.setName("Keith");
|
||||
SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
|
||||
birthDate.setSendCard(true);
|
||||
birthDate.setDate(format.parse("29/12/1977"));
|
||||
BindException errors = new BindException(birthDate, "birthDate");
|
||||
validator.validateCardForm(birthDate, errors);
|
||||
assertEquals(1, errors.getAllErrors().size());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user