Examples of ValidationInfo


Examples of org.apache.cayenne.project.validator.ValidationInfo

*
*/
public class ValidationDisplayHandlerTest extends TestCase {

    public void testValidationInfo() throws Exception {
        ValidationInfo info = new ValidationInfo(-1, "123", null);
        ValidationDisplayHandler handler = new ConcreteErrorMsg(info);

        assertSame(info, handler.getValidationInfo());
    }
View Full Code Here

Examples of org.apache.cayenne.project.validator.ValidationInfo

        assertSame(info, handler.getValidationInfo());
    }

    public void testMessage() throws Exception {
        String msg = "abc";
        ValidationInfo info = new ValidationInfo(-1, msg, null);
        ValidationDisplayHandler handler = new ConcreteErrorMsg(info);

        assertSame(msg, handler.getMessage());
    }
View Full Code Here

Examples of org.apache.cayenne.project.validator.ValidationInfo

        assertSame(msg, handler.getMessage());
    }

    public void testSeverity() throws Exception {
        ValidationInfo info =
            new ValidationInfo(ValidationDisplayHandler.ERROR, null, null);
        ValidationDisplayHandler handler = new ConcreteErrorMsg(info);

        assertEquals(ValidationDisplayHandler.ERROR, handler.getSeverity());
    }
View Full Code Here

Examples of org.apache.cayenne.project.validator.ValidationInfo

        assertEquals(ValidationDisplayHandler.ERROR, handler.getSeverity());
    }

    public void testDomain() throws Exception {
        ValidationInfo info =
            new ValidationInfo(ValidationDisplayHandler.ERROR, null, null);
        ValidationDisplayHandler handler = new ConcreteErrorMsg(info);

        DataDomain dom = new DataDomain("test");
        assertNull(handler.getDomain());
        handler.setDomain(dom);
View Full Code Here

Examples of org.apache.derby.impl.sql.execute.DeferredConstraintsMemory.ValidationInfo

        // For CHECK constraints, the key is the table id. All other
        // constraints use the constraint id as key.
        UUID key = cd.hasBackingIndex() ? cd.getUUID() : cd.getTableId();

        ValidationInfo vi = deferredHashTables.get(key);

        if (vi == null) {
            // Nothing to do
            return;
        }

        vi.validateConstraint(this, cd.getUUID(), false);

        // No violations, bug can't forget since we might roll back to a
        // savepoint that migh re-introduce the violations
        // DERBY-6670-
        //
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo

   * @return
   *     An XML Validation Report representing the information contained in the IValidationReport.
   */
  protected ValidationReport convertReportToXMLReport(IValidationReport report)
  {
  ValidationInfo convertedReport = new ValidationInfo(report.getFileURI());
  IValidationMessage[] messages = report.getValidationMessages();
  int numMessages = messages.length;
  for(int i = 0; i < numMessages; i++)
  {
    convertMessage(messages[i], convertedReport);
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo

  @Override
  public ValidationReport validate(String uri, InputStream inputstream,
      NestedValidatorContext context) {   

    ValidationInfo validationReport = new ValidationInfo(uri);
    try {
      //Get IFile from URI
      IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(new URI(uri.replace(" ", "%20")));
     
      //hmm, could be multiple? Lets just take the first
View Full Code Here

Examples of org.strecks.validator.internal.ValidationInfo

 
    DelegatingForm delegator = new DelegatingForm(form);
    delegator.setBindConvertInfo(bindConvertInfo);
   
    ValidationAnnotationReader reader = new ValidationAnnotationReader();
    ValidationInfo validatorMap = reader.readValidationHandlers(form, bindConvertInfo)
    delegator.setValidationInfo(validatorMap)
   
    return delegator;
  }
View Full Code Here

Examples of org.strecks.validator.internal.ValidationInfo

    MethodValidators methodValidators = createStrictMock(MethodValidators.class);
    Converter converter = createStrictMock(Converter.class);

    Date sqlDate = Date.valueOf("1999-12-12");
    simpleForm.setDateValue("1999-12-12");
    ValidationInfo vi = new ValidationInfo(validators, handler, new DefaultConversionHandler());

    expect(validators.keySet()).andReturn(keys);
    expect(keys.iterator()).andReturn(iterator);
    expect(iterator.hasNext()).andReturn(true);
    expect(iterator.next()).andReturn(op);
View Full Code Here

Examples of org.strecks.validator.internal.ValidationInfo

    MethodValidators methodValidators = createStrictMock(MethodValidators.class);
    Converter converter = createStrictMock(Converter.class);

    Date sqlDate = Date.valueOf("1999-12-12");
    simpleForm.setDateValue("1999-12-12");
    ValidationInfo vi = new ValidationInfo(validators, handler, new DefaultConversionHandler());

    expect(validators.keySet()).andReturn(keys);
    expect(keys.iterator()).andReturn(iterator);
    expect(iterator.hasNext()).andReturn(true);
    expect(iterator.next()).andReturn(op);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.