Package org.springframework.core

Examples of org.springframework.core.Ordered


        ITestBean proxy = (ITestBean) applicationContext.getBean("proxy");
        assertEquals("rod", proxy.getName());
    }
   
    public void testCallOrderedMethod() throws Exception {
        Ordered proxy = (Ordered) applicationContext.getBean("proxy");
        assertEquals(1, proxy.getOrder());
    }
View Full Code Here


        assertEquals(1, proxy.getOrder());
    }
   
    public void testNoResponseFromSpace() throws Exception {

        Ordered proxy = (Ordered) applicationContext.getBean("proxy");
        killWorkerThreads();
        assertFalse("worker thread alive ", testBeanWorkerThread.isAlive());
        assertFalse("orderedThread alive ", orderedWorkerThread.isAlive());

        try {
            proxy.getOrder();
            fail("Workers were killed");
        }
        catch (RemoteAccessException ex) {
            // Ok
        }
View Full Code Here

    assertEquals(1, delegate.callcount);
  }

  @Test
  public void testAnnotationsWithOrdered() throws Exception {
    Object delegate = new Ordered() {
      @BeforeStep
      public void foo(StepExecution execution) {
      }

      @Override
View Full Code Here

    assertTrue(JobListenerFactoryBean.isListener(new JobListenerWithInterface()));
  }

  @Test
  public void testAnnotationsWithOrdered() throws Exception {
    Object delegate = new Ordered() {
      @BeforeJob
      public void foo(JobExecution execution) {
      }

      @Override
View Full Code Here

  }

  @Test
  public void testAddOrdered() {
    list.setItems(Arrays.asList((Object) "1"));
    list.add(new Ordered() {
      @Override
      public int getOrder() {
        return 0;
      }
    });
View Full Code Here

  }

  @Test
  public void testAddMultipleOrdered() {
    list.setItems(Arrays.asList((Object) "1"));
    list.add(new Ordered() {
      @Override
      public int getOrder() {
        return 1;
      }
    });
    list.add(new Ordered() {
      @Override
      public int getOrder() {
        return 0;
      }
    });
View Full Code Here

  }

  @Test
  public void testAddDuplicateOrdered() {
    list.setItems(Arrays.asList((Object) "1"));
    list.add(new Ordered() {
      @Override
      public int getOrder() {
        return 1;
      }
    });
    list.add(new Ordered() {
      @Override
      public int getOrder() {
        return 1;
      }
    });
View Full Code Here

    assertEquals("1", iterator.next());
  }

  @Test
  public void testAddAnnotationOrdered() {
    list.add(new Ordered() {
      @Override
      public int getOrder() {
        return 1;
      }
    });
View Full Code Here

TOP

Related Classes of org.springframework.core.Ordered

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.