Examples of methodMatch()


Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    }

    @Test
    public void testClassMatchSignatureReturnClassType() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xff, "test.*", "get", "java.lang.String"));
        Assert.assertTrue(sms.methodMatch("test.someClass", null, null, 1, "get", "()Ljava/lang/String;", null));
    }

    @Test
    public void testClassMatchWithNullArgument() {
        SpyMatcherSet sms = new SpyMatcherSet(
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    @Test
    public void testClassMatchWithNullArgument() {
        SpyMatcherSet sms = new SpyMatcherSet(
                spy.byMethod(0, "javax.naming.directory.InitialDirContext", "search", null, "String", "String", null,
                        "javax.naming.directory.SearchControls"));
        Assert.assertTrue(sms.methodMatch("javax.naming.directory.InitialDirContext", null, null, 1, "search",
                "(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;Ljavax/naming/directory/SearchControls;)Ljavax/naming/NamingEnumeration;", null));
    }

    @Test
    public void testClassMatchWithArrayArgument() {
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    @Test
    public void testClassMatchWithArrayArgument() {
        SpyMatcherSet sms = new SpyMatcherSet(
                spy.byMethod(0, "javax.naming.directory.InitialDirContext", "search", null, "String", "String", "Object[]",
                        "javax.naming.directory.SearchControls"));
        Assert.assertTrue(sms.methodMatch("javax.naming.directory.InitialDirContext", null, null, 1, "search",
                "(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;Ljavax/naming/directory/SearchControls;)Ljavax/naming/NamingEnumeration;", null));
    }

    @Test
    public void testClassMatchSignatureWithSimpleReturnAndArgumentType() {
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    @Test
    public void testClassMatchSignatureWithSimpleReturnAndArgumentType() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xff, "test.*", "frobnicate", "int", "int"));
        SpyMatcher cm = new SpyMatcher(0, 0xFF, "test.*", "frobnicate", "int", "int");
        Assert.assertTrue(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(I)I", null));
        Assert.assertFalse(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(J)I", null));
    }


    @Test
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    @Test
    public void testClassMatchSignatureWithSimpleReturnAndArgumentType() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xff, "test.*", "frobnicate", "int", "int"));
        SpyMatcher cm = new SpyMatcher(0, 0xFF, "test.*", "frobnicate", "int", "int");
        Assert.assertTrue(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(I)I", null));
        Assert.assertFalse(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(J)I", null));
    }


    @Test
    public void testClassMatchSignatureWithStringType() {
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()


    @Test
    public void testClassMatchSignatureWithStringType() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xff, "test.*", "frobnicate", "String", "String"));
        Assert.assertTrue(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(Ljava/lang/String;)Ljava/lang/String;", null));
        Assert.assertFalse(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(J)I", null));
    }

    @Test
    public void testClassMatchWithVariousArgs() {
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    @Test
    public void testClassMatchSignatureWithStringType() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xff, "test.*", "frobnicate", "String", "String"));
        Assert.assertTrue(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(Ljava/lang/String;)Ljava/lang/String;", null));
        Assert.assertFalse(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(J)I", null));
    }

    @Test
    public void testClassMatchWithVariousArgs() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xff, "test.*", "frobnicate", "String", "int", "com.jitlogic.zorka.spy.CallInfo"));
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    }

    @Test
    public void testClassMatchWithVariousArgs() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xff, "test.*", "frobnicate", "String", "int", "com.jitlogic.zorka.spy.CallInfo"));
        Assert.assertTrue(sms.methodMatch("test.SomeClass", null, null, 1, "frobnicate", "(ILcom/jitlogic/zorka/spy/CallInfo;)Ljava/lang/String;", null));
    }

    @Test
    public void testClassMatchWithNoArgsMarker() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xFF, "test.*", "frobnicate", null, SM_NOARGS));
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    }

    @Test
    public void testClassMatchWithNoArgsMarker() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xFF, "test.*", "frobnicate", null, SM_NOARGS));
        Assert.assertTrue(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "()V", null));
        Assert.assertFalse(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(I)V", null));
    }

    @Test
    public void testMatchWithMoreAttributesAndNoArgsFlag() {
View Full Code Here

Examples of com.jitlogic.zorka.core.spy.SpyMatcherSet.methodMatch()

    @Test
    public void testClassMatchWithNoArgsMarker() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xFF, "test.*", "frobnicate", null, SM_NOARGS));
        Assert.assertTrue(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "()V", null));
        Assert.assertFalse(sms.methodMatch("test.someClass", null, null, 1, "frobnicate", "(I)V", null));
    }

    @Test
    public void testMatchWithMoreAttributesAndNoArgsFlag() {
        SpyMatcherSet sms = new SpyMatcherSet(spy.byMethod(0xff, "test.*", "frobnicate", null, "int", SM_NOARGS));
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.