Package org.springframework.tests.sample.beans

Examples of org.springframework.tests.sample.beans.LifecycleBean.businessMethod()


    assertTestBeanCount(13);
  }

  public void testLifecycleMethods() throws Exception {
    LifecycleBean bean = (LifecycleBean) getBeanFactory().getBean("lifecycle");
    bean.businessMethod();
  }

  public void testProtectedLifecycleMethods() throws Exception {
    ProtectedLifecycleBean bean = (ProtectedLifecycleBean) getBeanFactory().getBean("protectedLifecycle");
    bean.businessMethod();
View Full Code Here


  public void testLifecycleCallbacks() {
    LifecycleBean lb = (LifecycleBean) getBeanFactory().getBean("lifecycle");
    assertEquals("lifecycle", lb.getBeanName());
    // The dummy business method will throw an exception if the
    // necessary callbacks weren't invoked in the right order.
    lb.businessMethod();
    assertTrue("Not destroyed", !lb.isDestroyed());
  }

  public void testFindsValidInstance() {
    try {
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.