Package org.springframework.oxm

Examples of org.springframework.oxm.Unmarshaller.supports()


        }
        else if (unmarshaller instanceof GenericUnmarshaller) {
            return ((GenericUnmarshaller) unmarshaller).supports(parameter.getGenericParameterType());
        }
        else {
            return unmarshaller.supports(parameter.getParameterType());
        }
    }

    @Override
    public Object resolveArgument(MessageContext messageContext, MethodParameter parameter) throws Exception {
View Full Code Here


  @Test
  public void canRead() throws Exception {
    Unmarshaller unmarshaller = mock(Unmarshaller.class);

    given(unmarshaller.supports(Integer.class)).willReturn(false);
    given(unmarshaller.supports(String.class)).willReturn(true);

    MarshallingHttpMessageConverter converter = new MarshallingHttpMessageConverter();
    converter.setUnmarshaller(unmarshaller);
View Full Code Here

  @Test
  public void canRead() throws Exception {
    Unmarshaller unmarshaller = mock(Unmarshaller.class);

    given(unmarshaller.supports(Integer.class)).willReturn(false);
    given(unmarshaller.supports(String.class)).willReturn(true);

    MarshallingHttpMessageConverter converter = new MarshallingHttpMessageConverter();
    converter.setUnmarshaller(unmarshaller);

    assertFalse(converter.canRead(Boolean.class, MediaType.TEXT_PLAIN));
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.