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 */
021 public class EmptyPicoContainerTestCase extends TestCase {
022
023 public void testReturnValues() {
024 PicoContainer pico = new EmptyPicoContainer();
025 assertNull(pico.getComponentAdapter(null, null));
026 assertNull(pico.getComponentAdapter(null, null));
027 assertTrue(pico.getComponentAdapters().isEmpty());
028 assertTrue(pico.getComponentAdapters(null).isEmpty());
029 assertNull(pico.getComponent(null));
030 assertNull(pico.getComponent(null));
031 assertTrue(pico.getComponents().isEmpty());
032 assertTrue(pico.getComponents(null).isEmpty());
033 assertNull(pico.getParent());
034 }
035 }