Package br.com.caelum.vraptor.converter

Examples of br.com.caelum.vraptor.converter.StringConverter


  context.put("nullHandler", new GenericNullHandler(removal));
  // OgnlRuntime.setPropertyAccessor(Set.class, new SetAccessor());
  // OgnlRuntime.setPropertyAccessor(Map.class, new MapAccessor());
  this.bundle = ResourceBundle.getBundle("messages");
  Ognl.setTypeConverter(context, new VRaptorConvertersAdapter(converters, bundle));
  when(converters.to(String.class)).thenReturn(new StringConverter());
    when(converters.to(Long.class)).thenReturn(new LongConverter());
   
    context.put("proxifier", new JavassistProxifier(new ReflectionInstanceCreator()));
  }
View Full Code Here


    context.put("removal", removal);
    context.put("nullHandler", new GenericNullHandler(removal));
    context.put("proxifier", proxifier);
   
    when(container.instanceFor(Converters.class)).thenReturn(converters);
    when(converters.to(String.class)).thenReturn(new StringConverter());
    when(converters.to(Long.class)).thenReturn(new LongConverter());
  }
View Full Code Here

  when(converters.existsFor(Long.class)).thenReturn(true);
  when(converters.existsFor(long.class)).thenReturn(true);
  when(converters.existsFor(String.class)).thenReturn(true);
  when(converters.to(Long.class)).thenReturn(new LongConverter());
  when(converters.to(long.class)).thenReturn(new PrimitiveLongConverter());
  when(converters.to(String.class)).thenReturn(new StringConverter());

  when(nameProvider.parameterNamesFor(any(AccessibleObject.class))).thenReturn(new String[0]);

  buyA     = method("buyA", House.class);
  kick     = method("kick", AngryCat.class);
View Full Code Here

    MockitoAnnotations.initMocks(this);
  this.instance = new ArrayList<String>();
  when(context.getRoot()).thenReturn(instance);

  when(context.get("rootType")).thenReturn(Types.listOf(String.class));
  when(converters.to(String.class)).thenReturn((Converter) new StringConverter());
  this.accessor = new ListAccessor(converters);
  }
View Full Code Here

  removal = new EmptyElementsRemoval();
  bundle = ResourceBundle.getBundle("messages");
 
  when(container.instanceFor(Converters.class)).thenReturn(converters);
  when(converters.to(Long.class)).thenReturn(new LongConverter());
  when(converters.to(String.class)).thenReturn(new StringConverter());
  when(container.instanceFor(EmptyElementsRemoval.class)).thenReturn(removal);
 
  this.myCat = new Cat();
  this.context = (OgnlContext) Ognl.createDefaultContext(myCat);
  context.setTraceEvaluations(true);
View Full Code Here

    when(converters.existsFor(Long.class)).thenReturn(true);
    when(converters.existsFor(long.class)).thenReturn(true);
    when(converters.existsFor(String.class)).thenReturn(true);
    when(converters.to(Long.class)).thenReturn(new LongConverter());
    when(converters.to(long.class)).thenReturn(new PrimitiveLongConverter());
    when(converters.to(String.class)).thenReturn(new StringConverter());
  }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.converter.StringConverter

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.