Package org.springframework.web.bind.support

Examples of org.springframework.web.bind.support.WebBindingInitializer


  @Test
  public void shouldInitBinderForComplexType() throws Exception {
    Map<String, Object> source = new HashMap<String, Object>();
    source.put("x", new ComplexType(1, 2L));
    setHandlerMethod("requestParamComplexType");
    WebBindingInitializer webBindingInitializer = mock(WebBindingInitializer.class);
    given(this.context.getWebBindingInitializer()).willReturn(webBindingInitializer);
    this.builder.build(this.nativeRequest, source);
    verify(webBindingInitializer).initBinder(any(WebDataBinder.class), any(WebRequest.class));
  }
View Full Code Here


    assertThat(i, is(2));
  }

  @Test
  public void shouldSupportWebBindingInitializer() throws Exception {
    WebBindingInitializer webBindingInitializer = mock(WebBindingInitializer.class);
    this.resolver.setApplicationContext(this.applicationContext);
    this.resolver.setWebBindingInitializer(webBindingInitializer);
    this.resolver.afterPropertiesSet();
    assertThat(this.resolver.getWebBindingInitializer(), is(sameInstance(webBindingInitializer)));
    this.resolver.resolve(this.facesContext, this.context);
View Full Code Here

  @Test
  public void shouldSupportContextSetters() throws Exception {
    WebArgumentResolver webArgumentResolver = mock(WebArgumentResolver.class);
    WebArgumentResolver[] customArgumentResolvers = new WebArgumentResolver[] { webArgumentResolver };
    PathMatcher pathMatcher = mock(PathMatcher.class);
    WebBindingInitializer webBindingInitializer = mock(WebBindingInitializer.class);
    ParameterNameDiscoverer parameterNameDiscoverer = mock(ParameterNameDiscoverer.class);
    this.resolver.setCustomArgumentResolvers(customArgumentResolvers);
    this.resolver.setPathMatcher(pathMatcher);
    this.resolver.setWebBindingInitializer(webBindingInitializer);
    this.resolver.setParameterNameDiscoverer(parameterNameDiscoverer);
View Full Code Here

TOP

Related Classes of org.springframework.web.bind.support.WebBindingInitializer

Copyright © 2018 www.massapicom. 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.