Search in sources :

Example 31 with PlasticClass

use of org.apache.tapestry5.plastic.PlasticClass in project tapestry-5 by apache.

the class MixinAfterWorkerTest method annotation_present.

@Test
public void annotation_present() {
    PlasticClass pc = newMock(PlasticClass.class);
    MutableComponentModel model = mockMutableComponentModel();
    expect(pc.hasAnnotation(MixinAfter.class)).andReturn(true);
    model.setMixinAfter(true);
    replay();
    new MixinAfterWorker().transform(pc, null, model);
    verify();
}
Also used : PlasticClass(org.apache.tapestry5.plastic.PlasticClass) MutableComponentModel(org.apache.tapestry5.model.MutableComponentModel) Test(org.testng.annotations.Test)

Example 32 with PlasticClass

use of org.apache.tapestry5.plastic.PlasticClass in project tapestry-5 by apache.

the class SupportsInformalParametersWorkerTest method annotation_missing.

@Test
public void annotation_missing() {
    PlasticClass plasticClass = mockPlasticClass();
    MutableComponentModel model = mockMutableComponentModel();
    expect(plasticClass.hasAnnotation(SupportsInformalParameters.class)).andReturn(false);
    replay();
    new SupportsInformalParametersWorker().transform(plasticClass, null, model);
    verify();
}
Also used : PlasticClass(org.apache.tapestry5.plastic.PlasticClass) MutableComponentModel(org.apache.tapestry5.model.MutableComponentModel) Test(org.testng.annotations.Test)

Example 33 with PlasticClass

use of org.apache.tapestry5.plastic.PlasticClass in project tapestry-5 by apache.

the class SupportsInformalParametersWorkerTest method annotation_present.

@Test
public void annotation_present() {
    PlasticClass plasticClass = mockPlasticClass();
    MutableComponentModel model = mockMutableComponentModel();
    expect(plasticClass.hasAnnotation(SupportsInformalParameters.class)).andReturn(true);
    model.enableSupportsInformalParameters();
    replay();
    new SupportsInformalParametersWorker().transform(plasticClass, null, model);
    verify();
}
Also used : PlasticClass(org.apache.tapestry5.plastic.PlasticClass) MutableComponentModel(org.apache.tapestry5.model.MutableComponentModel) Test(org.testng.annotations.Test)

Aggregations

PlasticField (org.apache.tapestry5.plastic.PlasticField)13 PlasticClass (org.apache.tapestry5.plastic.PlasticClass)11 InstructionBuilder (org.apache.tapestry5.plastic.InstructionBuilder)5 InstructionBuilderCallback (org.apache.tapestry5.plastic.InstructionBuilderCallback)5 PlasticMethod (org.apache.tapestry5.plastic.PlasticMethod)5 Method (java.lang.reflect.Method)4 MutableComponentModel (org.apache.tapestry5.model.MutableComponentModel)4 PlasticClassTransformer (org.apache.tapestry5.plastic.PlasticClassTransformer)3 Test (org.testng.annotations.Test)3 PersistenceContext (javax.persistence.PersistenceContext)2 SneakyThrows (lombok.SneakyThrows)2 ComponentResources (org.apache.tapestry5.ComponentResources)2 Import (org.apache.tapestry5.annotations.Import)2 InternalComponentResources (org.apache.tapestry5.internal.InternalComponentResources)2 InstanceContext (org.apache.tapestry5.plastic.InstanceContext)2 MethodAdvice (org.apache.tapestry5.plastic.MethodAdvice)2 IFn (clojure.lang.IFn)1 Symbol (clojure.lang.Symbol)1 SessionTracker (com.flowlogix.web.mixins.SessionTracker)1 AJAX (com.flowlogix.web.services.annotations.AJAX)1