Examples of SampleListener


Examples of org.apache.harmony.beans.tests.support.SampleListener

     */
    public void testCreateWithMethodCallWhichIsSetter() {
        InvocationObject invocationObject = new InvocationObject();
        SampleEvent event = new SampleEvent("bean");

        SampleListener listener = EventHandler.create(SampleListener.class,
                invocationObject, "doSomething", "i", null);

        listener.fireSampleEvent(event);

        assertEquals("doSomething", getMethodName());
        assertEquals(event.getI(), invocationObject.getIntValue());
    }
View Full Code Here

Examples of org.apache.harmony.beans.tests.support.SampleListener

     */
    public void testCreateForStaticMethodAsPropertyGetter() {
        InvocationObject invocationObject = new InvocationObject();
        SampleEvent event = new SampleEvent("bean");

        SampleListener listener = EventHandler.create(SampleListener.class,
                invocationObject, "someValue", "j");

        listener.fireSampleEvent(event);

        assertEquals("setSomeValue", getMethodName());
    }
View Full Code Here

Examples of org.apache.harmony.beans.tests.support.SampleListener

     */
    public void testCreateWithMethodCallWhichIsSetter() {
        InvocationObject invocationObject = new InvocationObject();
        SampleEvent event = new SampleEvent("bean");

        SampleListener listener = EventHandler.create(SampleListener.class,
                invocationObject, "doSomething", "i", null);

        listener.fireSampleEvent(event);

        assertEquals("doSomething", getMethodName());
        assertEquals(event.getI(), invocationObject.getIntValue());
    }
View Full Code Here

Examples of org.apache.harmony.beans.tests.support.SampleListener

     */
    public void testCreateForStaticMethodAsPropertyGetter() {
        InvocationObject invocationObject = new InvocationObject();
        SampleEvent event = new SampleEvent("bean");

        SampleListener listener = EventHandler.create(SampleListener.class,
                invocationObject, "someValue", "j");

        listener.fireSampleEvent(event);

        assertEquals("setSomeValue", getMethodName());
    }
View Full Code Here

Examples of org.apache.harmony.beans.tests.support.SampleListener

     * fileSampleEvent scenario by throwing RuntimeException
     */
    public void test_Create_WithThrowRuntimeException() {
        // Regression for Harmony-2434
        InvocationObject invocationObject = new InvocationObject();
        SampleListener listener = EventHandler.create(SampleListener.class,invocationObject, "throwRuntimeException");
        try {
            listener.fireSampleEvent(new SampleEvent("bean"));
            fail("Expected RuntimeException thrown");
        } catch (RuntimeException re) {
            // Expected
        }
    }
View Full Code Here

Examples of org.apache.harmony.beans.tests.support.SampleListener

     */
    public void testCreateWithMethodCallWhichIsSetter() {
        InvocationObject invocationObject = new InvocationObject();
        SampleEvent event = new SampleEvent("bean");

        SampleListener listener = EventHandler.create(SampleListener.class,
                invocationObject, "doSomething", "i", null);

        listener.fireSampleEvent(event);

        assertEquals("doSomething", getMethodName());
        assertEquals(event.getI(), invocationObject.getIntValue());
    }
View Full Code Here

Examples of org.apache.harmony.beans.tests.support.SampleListener

     */
    public void testCreateForStaticMethodAsPropertyGetter() {
        InvocationObject invocationObject = new InvocationObject();
        SampleEvent event = new SampleEvent("bean");

        SampleListener listener = EventHandler.create(SampleListener.class,
                invocationObject, "someValue", "j");

        listener.fireSampleEvent(event);

        assertEquals("setSomeValue", getMethodName());
    }
View Full Code Here

Examples of org.apache.harmony.beans.tests.support.SampleListener

     * fileSampleEvent scenario by throwing RuntimeException
     */
    public void test_Create_WithThrowRuntimeException() {
        // Regression for Harmony-2434
        InvocationObject invocationObject = new InvocationObject();
        SampleListener listener = EventHandler.create(SampleListener.class,invocationObject, "throwRuntimeException");
        try {
            listener.fireSampleEvent(new SampleEvent("bean"));
            fail("Expected RuntimeException thrown");
        } catch (RuntimeException re) {
            // Expected
        }
    }
View Full Code Here

Examples of org.apache.jmeter.samplers.SampleListener

  {
    SampleEvent event = new SampleEvent(result, group.getName());
    Iterator iter = listeners.iterator();
    while (iter.hasNext())
    {
      SampleListener item = (SampleListener)iter.next();
      item.sampleOccurred(event);
    }
    group.sampleOccurred(event);
  }
View Full Code Here

Examples of org.apache.jmeter.samplers.SampleListener

    }
   
    iter = configs.getListeners().iterator();
    while(iter.hasNext())
    {
      SampleListener lis = (SampleListener)iter.next();
      TestElement cloned = (TestElement)cloneIfNecessary(lis);
      if(objectsWithFunctions.contains(lis))
      {
        replaceValues(cloned);
      }
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.