Examples of MethodIdentifier


Examples of com.volantis.testtools.mock.method.MethodIdentifier

    protected Expectation createExpectation() {
        Object[] arguments = new Object[]{
            "input"
        };

        MethodIdentifier identifier =
                FooMock._getMethodIdentifier("setBar(java.lang.String)");
        return new ExpectedMethodInvocationImpl(fooMock, identifier,
                new ExpectedArguments(identifier, arguments, true), null);
    }
View Full Code Here

Examples of com.volantis.testtools.mock.method.MethodIdentifier

        Object[] arguments = new Object[]{
            "input"
        };

        MethodIdentifier identifier =
                FooMock._getMethodIdentifier("setBar(java.lang.String)");
        list.add(new MethodInvocationEvent(fooMock, identifier, arguments));

        return list;
    }
View Full Code Here

Examples of com.volantis.testtools.mock.method.MethodIdentifier

    protected Expectation createExpectation() {
        Object[] arguments = new Object[]{
                "input"
        };

        MethodIdentifier identifier =
                FooMock._getMethodIdentifier("setBar(java.lang.String)");
        return new ExpectedMethodInvocationImpl(fooMock, identifier,
                new ExpectedArguments(identifier, arguments, true), null);
    }
View Full Code Here

Examples of com.volantis.testtools.mock.method.MethodIdentifier

    protected List createSatisfyingEvents() {
        List list = new ArrayList();
        Object[] arguments = new Object[]{
                "input"
        };
        MethodIdentifier identifier =
                FooMock._getMethodIdentifier("setBar(java.lang.String)");
        list.add(new MethodInvocationEvent(fooMock, identifier, arguments));
        return list;
    }
View Full Code Here

Examples of com.volantis.testtools.mock.method.MethodIdentifier

                    "toString",
                    new Class[0],
                    null);

    public static MethodIdentifier _getMethodIdentifier(String signature) {
        MethodIdentifier methodIdentifier =
                (MethodIdentifier) SIGNATURE_2_IDENTIFIER.get(signature);
        if (methodIdentifier == null) {
            throw new IllegalArgumentException(
                    "Could not find identifier for " + signature);
        }
View Full Code Here

Examples of com.volantis.testtools.mock.method.MethodIdentifier

            new BundleContextMock("contextMock", expectations);
        final MockFactory mockFactory = MockFactory.getDefaultInstance();
        final Method registerServiceMethod = BundleContext.class.getMethod(
            "registerService",
            new Class[]{String.class, Object.class, Dictionary.class});
        final MethodIdentifier identifier =
            MethodIdentifier.getMethodIdentifier(registerServiceMethod);
        contextMock.fuzzy.registerService(
            identifier,
            EventHandler.class.getName(),
            mockFactory.expectsInstanceOf(ReportEventHandler.class),
View Full Code Here

Examples of org.jboss.invocation.proxy.MethodIdentifier

            if (methodAnnotations == null) {
                methodData = Collections.emptyMap();
            } else {
                methodData = new HashMap<MethodIdentifier, List<T>>();
                for (TargetAnnotation instance : methodAnnotations) {
                    final MethodIdentifier identifier = getMethodIdentifier(instance.target());
                    List<T> data = methodData.get(identifier);
                    if (data == null) {
                        methodData.put(identifier, data = new ArrayList<T>(1));
                    }
                    data.add(fromAnnotation(instance.instance()));
View Full Code Here

Examples of org.jboss.invocation.proxy.MethodIdentifier

        if (value instanceof Integer && ((Integer) value).intValue() == -1) return;
        StringBuilder builder = new StringBuilder("set").append(name);
        builder.setCharAt(3, Character.toUpperCase(name.charAt(0)));
        final String methodName = builder.toString();
        final Class<?> paramType = value.getClass();
        final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, paramType);
        final Method setterMethod = ClassReflectionIndexUtil.findMethod(deploymentReflectionIndex, clazz, methodIdentifier);
        if (setterMethod == null) {
            // just log a WARN message
            ROOT_LOGGER.ignoringProperty(name, methodName, paramType.getName(), clazz.getName());
            return;
View Full Code Here

Examples of org.jboss.invocation.proxy.MethodIdentifier

        } else if (args.length == 1 && !args[0].name().toString().equals(InvocationContext.class.getName())) {
            ROOT_LOGGER.warn(MESSAGES.invalidSignature(methodInfo.name(), annotationType, classInfo.name(), "void methodName(InvocationContext ctx)"));
            return;
        }

        final MethodIdentifier methodIdentifier;
        if (args.length == 0) {
            methodIdentifier = MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name());
        } else {
            methodIdentifier = MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name(), InvocationContext.class);
        }
View Full Code Here

Examples of org.jboss.invocation.proxy.MethodIdentifier

                }
            }
        }

        for (final Map.Entry<Method, List<String[]>> entry : interceptors.getMethodAnnotations().entrySet()) {
            final MethodIdentifier method = MethodIdentifier.getIdentifierForMethod(entry.getKey());
            for (final String interceptor : entry.getValue().get(0)) {
                description.addMethodInterceptor(method, new InterceptorDescription(interceptor));
            }
        }
    }
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.