Package com.jitlogic.zorka.core.spy.plugins

Examples of com.jitlogic.zorka.core.spy.plugins.GetterPresentingCollector


    }


    @Test
    public void testPublishObjectViaGetterCollector() throws Exception {
        SpyProcessor col = new GetterPresentingCollector(mBeanServerRegistry, "test", "test:name=TestObj", "testAttr", "meh", "C2");
        record.put("C0", 1L);
        record.put("C1", 1L);
        record.put("C2", "oja!");

        record.put(".STAGES", (Integer) record.get(".STAGES") | (1 << SpyLib.ON_SUBMIT));
        record.put(".STAGE", SpyLib.ON_SUBMIT);

        col.process(record);

        Object obj = getAttr(testMbs, "test:name=TestObj", "testAttr");
        assertEquals("getter should return string passed via spy record", "oja!", obj);
    }
View Full Code Here


    }


    @Test
    public void testPublishObjectViaGetterCollectorWithDispatch() throws Exception {
        SpyProcessor col = new GetterPresentingCollector(mBeanServerRegistry, "test", "test:name=TestObj", "testAttr", "meh", "C2", "length()");
        record.put("C0", 1L);
        record.put("C1", 1L);
        record.put("C2", "oja!");

        record.put(".STAGES", (Integer) record.get(".STAGES") | (1 << SpyLib.ON_SUBMIT));
        record.put(".STAGE", SpyLib.ON_SUBMIT);
        col.process(record);

        Object obj = getAttr(testMbs, "test:name=TestObj", "testAttr");
        assertEquals("getter should return length of string passed via spy record", 4, obj);
    }
View Full Code Here

TOP

Related Classes of com.jitlogic.zorka.core.spy.plugins.GetterPresentingCollector

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.