    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     *****************************************************************************/
    009
    010    package org.picocontainer.containers;
    011
    012    import java.util.Properties;
    013
    014    import org.junit.Test;
    015    import org.picocontainer.Characteristics;
    016    import org.picocontainer.DefaultPicoContainer;
    017    import org.picocontainer.MutablePicoContainer;
    018    import org.picocontainer.PicoContainer;
    019    import org.picocontainer.tck.AbstractPicoContainerTest;
    020
    021
    022    public class DelegatingMutablePicoContainerTestCase extends AbstractPicoContainerTest {
    023
    024        protected MutablePicoContainer createPicoContainer(PicoContainer parent) {
    025            return new MyDelegatingMutablePicoContainer(new DefaultPicoContainer());
    026        }
    027
    028        protected Properties[] getProperties() {
    029            return new Properties[] { Characteristics.NO_CACHE, Characteristics.NO_HIDE_IMPL};
    030        }
    031
    032        @SuppressWarnings("serial")
    033            private static class MyDelegatingMutablePicoContainer extends AbstractDelegatingMutablePicoContainer {
    034            public MyDelegatingMutablePicoContainer(MutablePicoContainer parent) {
    035                super(parent);
    036            }
    037
    038            public MutablePicoContainer makeChildContainer() {
    039                return new MyDelegatingMutablePicoContainer(this);
    040            }
    041        }
    042
    043
    044        @Test public void testAcceptImplementsBreadthFirstStrategy() {
    045            // don't run this one.
    046        }
    047
    048    }