View Javadoc
1   package org.codehaus.plexus.component.manager;
2   
3   import org.codehaus.plexus.PlexusTestCase;
4   
5   /**
6    * @author Ben Walding
7    * @version $Id$
8    */
9   public class ClassicSingletonComponentManagerTest
10      extends PlexusTestCase
11  {
12      public void testSequentialLookupsReturnTheSameInstance()
13          throws Exception
14      {
15          Component a = lookup( Component.class );
16  
17          Component b = lookup( Component.class );
18  
19          Component c = lookup( Component.class );
20  
21          Component d = lookup( Component.class );
22  
23          assertTrue( a == b );
24  
25          assertTrue( a == c );
26  
27          assertTrue( a == d );
28      }
29  }