1 7 package com.inversoft.verge.mvc.model.actionflow.test; 8 9 10 import java.util.Map ; 11 12 import junit.framework.Assert; 13 14 import com.inversoft.verge.mvc.controller.Action; 15 import com.inversoft.verge.mvc.validator.Validator; 16 import com.inversoft.verge.util.WebBeanProperty; 17 18 19 28 public class TestValidator implements Validator { 29 30 public static boolean conversion = false; 31 32 33 36 public TestValidator() { 37 super(); 38 } 39 40 41 44 public boolean validate(Map modelObjects, Action action) { 45 return false; 46 } 47 48 51 public void handleConversion(Object model, WebBeanProperty property, 52 Action action) { 53 conversion = true; 54 Assert.assertTrue("model should be instance of Bean1", model instanceof Bean1); 55 Assert.assertTrue("property should be integer", property.getPropertyName().equals("integer")); 56 Assert.assertTrue("property should be integer", property.getPropertyType() == Integer .class); 57 Assert.assertTrue("RequestContext should never be null", action.getRequestContext() != null); 58 } 59 } 60 | Popular Tags |