Package org.apache.aries.unittest.mocks

Examples of org.apache.aries.unittest.mocks.MethodCallHandler


    ProxyManager mgr = Skeleton.newMock(ProxyManager.class);
   
    //   public Object createProxy(Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher) throws UnableToProxyException;

    Skeleton.getSkeleton(mgr).registerMethodCallHandler(new MethodCall(ProxyManager.class, "createProxy", Bundle.class, Collection.class, Callable.class),
        new MethodCallHandler()
        {
          public Object handle(MethodCall methodCall, Skeleton skeleton) throws Exception
          {
            @SuppressWarnings("unchecked")
            Collection<Class<?>> interfaceClasses = (Collection<Class<?>>) methodCall.getArguments()[1];
View Full Code Here


    ProxyManager mgr = Skeleton.newMock(ProxyManager.class);
   
    //   public Object createDelegatingProxy(Bundle clientBundle, Collection<Class<?>> classes, Callable<Object> dispatcher, Object template) throws UnableToProxyException;

    Skeleton.getSkeleton(mgr).registerMethodCallHandler(new MethodCall(ProxyManager.class, "createDelegatingProxy", Bundle.class, Collection.class, Callable.class, Object.class),
        new MethodCallHandler()
        {
          public Object handle(MethodCall methodCall, Skeleton skeleton) throws Exception
          {
            @SuppressWarnings("unchecked")
            Collection<Class<?>> interfaceClasses = (Collection<Class<?>>) methodCall.getArguments()[1];
View Full Code Here

    MutableBeanMetadata mbm = new BeanMetadataImpl();
    mbm.setId("testPojo");
    mbm.setClassName(AnnotatedPojo.class.getName());
     
    Skeleton.getSkeleton(helper).registerMethodCallHandler(new MethodCall(TxComponentMetaDataHelper.class,
          "getComponentMethodTxAttribute", ComponentMetadata.class, String.class), new MethodCallHandler() {
         
          public Object handle(MethodCall arg0, Skeleton arg1) throws Exception {
            if(arg0.getArguments()[1].equals("increment"))
              return "Never";
           
View Full Code Here

TOP

Related Classes of org.apache.aries.unittest.mocks.MethodCallHandler

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.