Examples of JavassistProxifier


Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

  public MockResult(Proxifier proxifier) {
    this.proxifier = proxifier;
  }

  public MockResult() {
    this(new JavassistProxifier());
  }
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

    this.xstreambuilder = xstreambuilder;
    this.gsonBuilder = gsonBuilder;
  }

  public MockSerializationResult() {
    this(new JavassistProxifier(), XStreamBuilderImpl.cleanInstance(),
        new GsonBuilderWrapper(new MockInstanceImpl<>(new ArrayList<JsonSerializer<?>>()),
            new MockInstanceImpl<>(new ArrayList<JsonDeserializer<?>>()), new Serializee())
    );
  }
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

    I18nMessage i18ned = new I18nMessage("category", "message");
    i18ned.setBundle(new SingletonResourceBundle("message", "Something else"));

    XStreamBuilder xstreamBuilder = cleanInstance(new MessageConverter());
    MockSerializationResult result = new MockSerializationResult(null, xstreamBuilder, null, null);
    DefaultStatus status = new DefaultStatus(response, result, config, new JavassistProxifier(), router);

    status.badRequest(Arrays.asList(normal, i18ned));

    String serialized = result.serializedResult();
    assertThat(serialized, containsString("<message>The message</message>"));
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

          }

        }, this, new MockInstanceImpl<Serialization>(super.use(JSONSerialization.class))));
      }
    };
    DefaultStatus status = new DefaultStatus(response, result, config, new JavassistProxifier(), router);

    status.badRequest(Arrays.asList(normal, i18ned));

    String serialized = result.serializedResult();
    assertThat(serialized, containsString("\"message\":\"The message\""));
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

public class MockedPage implements PageResult {

  private final Proxifier proxifier;

  public MockedPage() {
    proxifier = new JavassistProxifier();
  }
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

  private ExceptionMapper mapper;

  @Before
  public void setUp() {
    MockitoAnnotations.initMocks(this);
    Proxifier proxifier = new JavassistProxifier();
    mapper = new DefaultExceptionMapper(proxifier);
  }
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

  @Before
  public void setUp() throws Exception {
    result = mock(Result.class);

    proxifier = new JavassistProxifier();
    factory = new DefaultValidationViewsFactory(result, proxifier);
    errors = Collections.emptyList();

  }
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

  @Before
  public void setup() {
    MockitoAnnotations.initMocks(this);
    method = DefaultControllerMethod.instanceFor(AnyResource.class, AnyResource.class.getDeclaredMethods()[0]);
    proxifier = new JavassistProxifier();
    methodInfo = new MethodInfo(new ParanamerNameProvider());
    methodInfo.setControllerMethod(method);
    fixedResolver = new PathResolver() {
      @Override
      public String pathFor(ControllerMethod method) {
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

  private Method anotherMethod;

  @Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    this.handler = new LinkToHandler(context, router, new JavassistProxifier());
    when(context.getContextPath()).thenReturn("/path");

    this.method2params = new Mirror().on(TestController.class).reflect().method("method").withArgs(String.class, int.class);
    this.method1param = new Mirror().on(TestController.class).reflect().method("method").withArgs(String.class);
    this.anotherMethod = new Mirror().on(TestController.class).reflect().method("anotherMethod").withArgs(String.class, int.class);
View Full Code Here

Examples of br.com.caelum.vraptor.proxy.JavassistProxifier

    ServletContext context1 = Mockito.mock(ServletContext.class);

    when(context0.getContextPath()).thenReturn("");
    when(context1.getContextPath()).thenReturn("/another");

    LinkToHandler handler0 = new LinkToHandler(context0, router, new JavassistProxifier());
    LinkToHandler handler1 = new LinkToHandler(context1, router, new JavassistProxifier());

    Object object0 = handler0.get(new DefaultBeanClass(TestController.class));
    assertThat(object0.getClass().getName(), containsString("$linkTo_$$"));

    Object object1 = handler1.get(new DefaultBeanClass(TestController.class));
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.