1 10 11 package org.picocontainer.alternatives; 12 13 import junit.framework.TestCase; 14 15 import org.picocontainer.PicoContainer; 16 17 21 public class EmptyPicoContainerTestCase extends TestCase { 22 23 public void testReturnValues() { 24 PicoContainer pico = new EmptyPicoContainer(); 25 assertNull(pico.getComponentAdapter(null)); 26 assertNull(pico.getComponentAdapterOfType(null)); 27 assertTrue(pico.getComponentAdapters().isEmpty()); 28 assertTrue(pico.getComponentAdaptersOfType(null).isEmpty()); 29 assertNull(pico.getComponentInstance(null)); 30 assertNull(pico.getComponentInstanceOfType(null)); 31 assertTrue(pico.getComponentInstances().isEmpty()); 32 assertTrue(pico.getComponentInstancesOfType(null).isEmpty()); 33 assertNull(pico.getParent()); 34 } 35 36 public void testVisitorAndLifecycleMethodsProduceNoResult() { 37 PicoContainer pico = new EmptyPicoContainer(); 38 pico.verify(); 39 pico.accept(null); 40 pico.start(); 41 pico.stop(); 42 pico.dispose(); 43 } 44 } 45 | Popular Tags |