Examples of Validated


Examples of io.dropwizard.validation.Validated

                .isEqualTo(1);
    }

    @Test
    public void returnsPartialValidatedRequestEntities() throws Exception {
        final Validated valid = mock(Validated.class);
        doReturn(Validated.class).when(valid).annotationType();
        when(valid.value()).thenReturn(new Class<?>[]{Partial1.class, Partial2.class});

        final ByteArrayInputStream entity = new ByteArrayInputStream("{\"id\":1,\"text\":\"hello Cemo\"}".getBytes());
        final Class<?> klass = PartialExample.class;

        final Object obj = provider.readFrom((Class<Object>) klass,
View Full Code Here

Examples of io.dropwizard.validation.Validated

            .isEqualTo(1);
    }

    @Test
    public void returnsPartialValidatedByGroupRequestEntities() throws Exception {
        final Validated valid = mock(Validated.class);
        doReturn(Validated.class).when(valid).annotationType();
        when(valid.value()).thenReturn(new Class<?>[]{Partial1.class});

        final ByteArrayInputStream entity = new ByteArrayInputStream("{\"id\":1}".getBytes());
        final Class<?> klass = PartialExample.class;

        final Object obj = provider.readFrom((Class<Object>) klass,
View Full Code Here

Examples of io.dropwizard.validation.Validated

            .isEqualTo(1);
    }

    @Test
    public void throwsAnInvalidEntityExceptionForPartialValidatedRequestEntities() throws Exception {
        final Validated valid = mock(Validated.class);
        doReturn(Validated.class).when(valid).annotationType();
        when(valid.value()).thenReturn(new Class<?>[]{Partial1.class, Partial2.class});

        final ByteArrayInputStream entity = new ByteArrayInputStream("{\"id\":1}".getBytes());

        try {
            final Class<?> klass = PartialExample.class;
View Full Code Here

Examples of org.springframework.validation.annotation.Validated

   * on the containing target class of the method.
   * @param invocation the current MethodInvocation
   * @return the applicable validation groups as a Class array
   */
  protected Class[] determineValidationGroups(MethodInvocation invocation) {
    Validated valid = AnnotationUtils.findAnnotation(invocation.getThis().getClass(), Validated.class);
    return (valid != null ? valid.value() : new Class[0]);
  }
View Full Code Here

Examples of org.springframework.validation.annotation.Validated

   * on the containing target class of the method.
   * @param invocation the current MethodInvocation
   * @return the applicable validation groups as a Class array
   */
  protected Class[] determineValidationGroups(MethodInvocation invocation) {
    Validated valid = AnnotationUtils.findAnnotation(invocation.getThis().getClass(), Validated.class);
    return (valid != null ? valid.value() : new Class[0]);
  }
View Full Code Here

Examples of org.springframework.validation.annotation.Validated

   * on the containing target class of the method.
   * @param invocation the current MethodInvocation
   * @return the applicable validation groups as a Class array
   */
  protected Class<?>[] determineValidationGroups(MethodInvocation invocation) {
    Validated valid = AnnotationUtils.findAnnotation(invocation.getThis().getClass(), Validated.class);
    return (valid != null ? valid.value() : new Class<?>[0]);
  }
View Full Code Here

Examples of org.vectomatic.dom.svg.ui.ExternalSVGResource.Validated

    // index.
    offsets.put(method.getName(), hashes.get(toWrite));
  }

  private boolean getValidated(JMethod method) {
    Validated validated = method.getAnnotation(Validated.class);
    if (validated == null) {
      return true;
    } else {
      return validated.validated();
    }
  }
View Full Code Here

Examples of org.vectomatic.dom.svg.ui.ExternalSVGResource.Validated

    // index.
    offsets.put(method.getName(), hashes.get(toWrite));
  }

  private boolean getValidated(JMethod method) {
    Validated validated = method.getAnnotation(Validated.class);
    if (validated == null) {
      return true;
    } else {
      return validated.validated();
    }
  }
View Full Code Here

Examples of org.vectomatic.dom.svg.ui.SVGResource.Validated

    return sw.toString();
  }

  private boolean getValidated(JMethod method) {
    Validated validated = method.getAnnotation(Validated.class);
    if (validated == null) {
      return true;
    } else {
      return validated.validated();
    }
  }
View Full Code Here

Examples of org.vectomatic.dom.svg.ui.SVGResource.Validated

    return sw.toString();
  }

  private boolean getValidated(JMethod method) {
    Validated validated = method.getAnnotation(Validated.class);
    if (validated == null) {
      return true;
    } else {
      return validated.validated();
    }
  }
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.