Package org.springframework.beans.factory.support

Examples of org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons()


    assertEquals(2, beanRegistry.getSingletonCount());
    assertEquals(2, beanRegistry.getSingletonNames().length);
    assertTrue(Arrays.asList(beanRegistry.getSingletonNames()).contains("tb"));
    assertTrue(Arrays.asList(beanRegistry.getSingletonNames()).contains("tb2"));

    beanRegistry.destroySingletons();
    assertEquals(0, beanRegistry.getSingletonCount());
    assertEquals(0, beanRegistry.getSingletonNames().length);
  }

  public void testDisposableBean() {
View Full Code Here


    assertEquals(1, beanRegistry.getSingletonCount());
    assertEquals(1, beanRegistry.getSingletonNames().length);
    assertTrue(Arrays.asList(beanRegistry.getSingletonNames()).contains("tb"));
    assertFalse(tb.wasDestroyed());

    beanRegistry.destroySingletons();
    assertEquals(0, beanRegistry.getSingletonCount());
    assertEquals(0, beanRegistry.getSingletonNames().length);
    assertTrue(tb.wasDestroyed());
  }
View Full Code Here

    String[] names = beanRegistry.getSingletonNames();
    assertEquals(2, names.length);
    assertEquals("tb", names[0]);
    assertEquals("tb2", names[1]);

    beanRegistry.destroySingletons();
    assertEquals(0, beanRegistry.getSingletonCount());
    assertEquals(0, beanRegistry.getSingletonNames().length);
  }

  @Test
View Full Code Here

    String[] names = beanRegistry.getSingletonNames();
    assertEquals(1, names.length);
    assertEquals("tb", names[0]);
    assertFalse(tb.wasDestroyed());

    beanRegistry.destroySingletons();
    assertEquals(0, beanRegistry.getSingletonCount());
    assertEquals(0, beanRegistry.getSingletonNames().length);
    assertTrue(tb.wasDestroyed());
  }
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.