KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nanocontainer > aop > dynaop > ContainerSuppliedMixinFactoryTestCase


1 /*****************************************************************************
2  * Copyright (c) PicoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  * *
8  * Idea by Rachel Davies, Original code by various *
9  *****************************************************************************/

10 package org.nanocontainer.aop.dynaop;
11
12 import dynaop.MixinFactory;
13 import org.jmock.MockObjectTestCase;
14 import org.nanocontainer.testmodel.IdentifiableMixin;
15 import org.picocontainer.MutablePicoContainer;
16 import org.picocontainer.defaults.DefaultPicoContainer;
17
18 /**
19  * @author Stephen Molitor
20  */

21 public class ContainerSuppliedMixinFactoryTestCase extends MockObjectTestCase {
22
23     private MutablePicoContainer pico = new DefaultPicoContainer();
24     private MixinFactory mixinFactory = new ContainerSuppliedMixinFactory(pico, IdentifiableMixin.class);
25
26     public void testCreate() {
27         Object JavaDoc mixin = (IdentifiableMixin) mixinFactory.create(null);
28         assertTrue(mixin instanceof IdentifiableMixin);
29     }
30
31     public void testPropertiesNotNull() {
32         assertNotNull(mixinFactory.getProperties());
33     }
34
35 }
Popular Tags