Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.ComponentClassTransformWorker


    field.claim(annotation);

    replay();

    ComponentClassTransformWorker worker = new InjectWorker(locator, ip,
        new QuietOperationTracker());

    worker.transform(ct, model);

    verify();
  }
View Full Code Here


    train_provideInjection(ip, "myfield", Request.class, locator, ct,
        model, false);

    replay();

    ComponentClassTransformWorker worker = new InjectWorker(locator, ip,
        new QuietOperationTracker());

    // Does the work but doesn't claim the field, since there was no match.

    worker.transform(ct, model);

    verify();
  }
View Full Code Here

    train_getClassName(ct, "foo.bar.Baz");

    replay();

    ComponentClassTransformWorker worker = new InjectWorker(locator, ip,
        new QuietOperationTracker());

    try {
      worker.transform(ct, model);
      unreachable();
    } catch (RuntimeException ex) {
      assertEquals(ex.getMessage(),
          "Error obtaining injected value for field foo.bar.Baz.myfield: Oops.");
      assertSame(ex.getCause(), failure);
View Full Code Here

        ct.claimField("myfield", annotation);

        replay();

        ComponentClassTransformWorker worker = new InjectWorker(locator, ip, new QuietOperationTracker());

        worker.transform(ct, model);

        verify();
    }
View Full Code Here

        train_provideInjection(ip, "myfield", Request.class, locator, ct, model, false);

        replay();

        ComponentClassTransformWorker worker = new InjectWorker(locator, ip, new QuietOperationTracker());

        // Does the work but doesn't claim the field, since there was no match.

        worker.transform(ct, model);

        verify();
    }
View Full Code Here

        train_getClassName(ct, "foo.bar.Baz");

        replay();

        ComponentClassTransformWorker worker = new InjectWorker(locator, ip, new QuietOperationTracker());

        try
        {
            worker.transform(ct, model);
            unreachable();
        }
        catch (RuntimeException ex)
        {
            assertEquals(
View Full Code Here

        train_findFieldsWithAnnotation(ct, ApplicationState.class);
        train_findFieldsWithAnnotation(ct, SessionState.class);

        replay();

        ComponentClassTransformWorker worker = new ApplicationStateWorker(manager, null);

        worker.transform(ct, model);

        verify();
    }
View Full Code Here

    public static final TransformMethodSignature RUN = new TransformMethodSignature("run");

    @Test
    public void access_to_protected_void_no_args_method() throws Exception
    {
        Object instance = transform(MethodAccessSubject.class, new ComponentClassTransformWorker()
        {
            public void transform(ClassTransformation transformation, MutableComponentModel model)
            {
                transformation.addImplementedInterface(Runnable.class);
View Full Code Here

    }

    @Test
    public void access_to_public_void_throws_exception() throws Exception
    {
        Object instance = transform(MethodAccessSubject.class, new ComponentClassTransformWorker()
        {
            public void transform(ClassTransformation transformation, MutableComponentModel model)
            {
                transformation.addImplementedInterface(Runnable.class);
View Full Code Here

    }

    @Test
    public void access_to_public_method_with_argument_and_return_value() throws Exception
    {
        Object instance = transform(MethodAccessSubject.class, new ComponentClassTransformWorker()
        {
            public void transform(ClassTransformation transformation, MutableComponentModel model)
            {
                transformation.addImplementedInterface(ProcessInteger.class);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.ComponentClassTransformWorker

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.