Search in sources :

Example 1 with MetaDataBuilder

use of org.exoplatform.container.management.MetaDataBuilder in project kernel by exoplatform.

the class TestMetaData method testImpact.

public void testImpact() {
    MetaDataBuilder builder = new MetaDataBuilder(Foo.class);
    ManagedTypeMetaData type = builder.build();
    Map<String, ManagedMethodMetaData> methodMap = getMethodMap(type);
    ManagedMethodMetaData read = methodMap.get("read");
    assertEquals(ImpactType.READ, read.getImpact());
    ManagedMethodMetaData write = methodMap.get("write");
    assertEquals(ImpactType.WRITE, write.getImpact());
    ManagedMethodMetaData idempotentWrite = methodMap.get("idempotentWrite");
    assertEquals(ImpactType.IDEMPOTENT_WRITE, idempotentWrite.getImpact());
}
Also used : ManagedTypeMetaData(org.exoplatform.management.spi.ManagedTypeMetaData) ManagedMethodMetaData(org.exoplatform.management.spi.ManagedMethodMetaData) MetaDataBuilder(org.exoplatform.container.management.MetaDataBuilder)

Example 2 with MetaDataBuilder

use of org.exoplatform.container.management.MetaDataBuilder in project kernel by exoplatform.

the class TestMetaData method testMethodNameOverride.

public void testMethodNameOverride() {
    MetaDataBuilder builder = new MetaDataBuilder(Bar.class);
    try {
        builder.build();
        fail();
    } catch (IllegalArgumentException expected) {
    }
}
Also used : MetaDataBuilder(org.exoplatform.container.management.MetaDataBuilder)

Aggregations

MetaDataBuilder (org.exoplatform.container.management.MetaDataBuilder)2 ManagedMethodMetaData (org.exoplatform.management.spi.ManagedMethodMetaData)1 ManagedTypeMetaData (org.exoplatform.management.spi.ManagedTypeMetaData)1