001    /*****************************************************************************
002     * Copyright (C) PicoContainer Organization. All rights reserved.            *
003     * ------------------------------------------------------------------------- *
004     * The software in this package is published under the terms of the BSD      *
005     * style license a copy of which has been included with this distribution in *
006     * the LICENSE.txt file.                                                     *
007     *                                                                           *
008     * Original code by the committers                                           *
009     *****************************************************************************/
010    
011    package org.picocontainer.containers;
012    
013    import junit.framework.TestCase;
014    
015    import org.picocontainer.PicoContainer;
016    import org.picocontainer.containers.EmptyPicoContainer;
017    
018    /**
019     * @author Mauro Talevi
020     * @version $Revision:  $
021     */
022    public class EmptyPicoContainerTestCase extends TestCase {
023    
024        public void testReturnValues() {
025            PicoContainer pico = new EmptyPicoContainer();
026            assertNull(pico.getComponentAdapter(null, null));
027            assertNull(pico.getComponentAdapter(null, null));
028            assertTrue(pico.getComponentAdapters().isEmpty());
029            assertTrue(pico.getComponentAdapters(null).isEmpty());
030            assertNull(pico.getComponent(null));
031            assertNull(pico.getComponent(null));
032            assertTrue(pico.getComponents().isEmpty());
033            assertTrue(pico.getComponents(null).isEmpty());
034            assertNull(pico.getParent());
035        }
036    }