Examples of MultivaluedHashMap


Examples of javax.ws.rs.core.MultivaluedHashMap

        final Object obj = provider.readFrom((Class<Object>) klass,
                Example[].class,
                new Annotation[]{ valid },
                MediaType.APPLICATION_JSON_TYPE,
                new MultivaluedHashMap(),
                entity);

        assertThat(obj)
                .isInstanceOf(Example[].class);
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

        final Object obj = provider.readFrom((Class<Object>) klass,
                new TypeToken<Map<Object, Example>>() {}.getType(),
                new Annotation[]{ valid },
                MediaType.APPLICATION_JSON_TYPE,
                new MultivaluedHashMap(),
                entity);

        assertThat(obj)
                .isInstanceOf(Map.class);
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

        final Object obj = provider.readFrom((Class<Object>) klass,
                type,
                new Annotation[]{ valid },
                MediaType.APPLICATION_JSON_TYPE,
                new MultivaluedHashMap(),
                entity);

        assertThat(obj)
                .isInstanceOf(klass);
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

            final Class<?> klass = Example.class;
            provider.readFrom((Class<Object>) klass,
                    new TypeToken<Collection<Example>>() {}.getType(),
                    new Annotation[]{ valid },
                    MediaType.APPLICATION_JSON_TYPE,
                    new MultivaluedHashMap(),
                    entity);
            failBecauseExceptionWasNotThrown(ConstraintViolationException.class);
        } catch (ConstraintViolationException e) {
            assertThat(ConstraintViolations.formatUntyped(e.getConstraintViolations()))
                    .contains("id must be greater than or equal to 0 (was -1)",
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

            final Class<?> klass = Example.class;
            provider.readFrom((Class<Object>) klass,
                    new TypeToken<Collection<Example>>() {}.getType(),
                    new Annotation[]{ valid },
                    MediaType.APPLICATION_JSON_TYPE,
                    new MultivaluedHashMap(),
                    entity);
            failBecauseExceptionWasNotThrown(ConstraintViolationException.class);
        } catch (ConstraintViolationException e) {
            assertThat(ConstraintViolations.formatUntyped(e.getConstraintViolations()))
                    .contains("id must be greater than or equal to 0 (was -2)");
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

            final Class<?> klass = Example.class;
            provider.readFrom((Class<Object>) klass,
                    new TypeToken<Set<Example>>() {}.getType(),
                    new Annotation[]{ valid },
                    MediaType.APPLICATION_JSON_TYPE,
                    new MultivaluedHashMap(),
                    entity);
            failBecauseExceptionWasNotThrown(ConstraintViolationException.class);
        } catch (ConstraintViolationException e) {
            assertThat(ConstraintViolations.formatUntyped(e.getConstraintViolations()))
                    .contains("id must be greater than or equal to 0 (was -1)",
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

            final Class<?> klass = Example.class;
            provider.readFrom((Class<Object>) klass,
                    new TypeToken<List<Example>>() {}.getType(),
                    new Annotation[]{ valid },
                    MediaType.APPLICATION_JSON_TYPE,
                    new MultivaluedHashMap(),
                    entity);
            failBecauseExceptionWasNotThrown(ConstraintViolationException.class);
        } catch (ConstraintViolationException e) {
            assertThat(ConstraintViolations.formatUntyped(e.getConstraintViolations()))
                    .containsOnly("id must be greater than or equal to 0 (was -1)",
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

            final Class<?> klass = Example.class;
            provider.readFrom((Class<Object>) klass,
                    new TypeToken<Map<Object, Example>>() {}.getType(),
                    new Annotation[]{ valid },
                    MediaType.APPLICATION_JSON_TYPE,
                    new MultivaluedHashMap(),
                    entity);
            failBecauseExceptionWasNotThrown(ConstraintViolationException.class);
        } catch (ConstraintViolationException e) {
            assertThat(ConstraintViolations.formatUntyped(e.getConstraintViolations()))
                    .contains("id must be greater than or equal to 0 (was -1)",
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

        final Object obj = provider.readFrom((Class<Object>) klass,
                new TypeToken<List<ListExample>>() {}.getType(),
                new Annotation[]{ valid },
                MediaType.APPLICATION_JSON_TYPE,
                new MultivaluedHashMap(),
                entity);

        assertThat(obj)
                .isInstanceOf(klass);
View Full Code Here

Examples of javax.ws.rs.core.MultivaluedHashMap

            final Class<?> klass = List.class;
            provider.readFrom((Class<Object>) klass,
                    new TypeToken<List<ListExample>>() {}.getType(),
                    new Annotation[]{ valid },
                    MediaType.APPLICATION_JSON_TYPE,
                    new MultivaluedHashMap(),
                    entity);
            failBecauseExceptionWasNotThrown(ConstraintViolationException.class);
        } catch (ConstraintViolationException e) {
            assertThat(ConstraintViolations.formatUntyped(e.getConstraintViolations()))
                    .containsOnly("examples may not be empty (was null)");
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.