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 * 009 *****************************************************************************/ 010 package org.picocontainer.defaults; 011 012 import junit.framework.TestCase; 013 import org.picocontainer.PicoIntrospectionException; 014 /** 015 * test that constant parameter behaves well. 016 * @author Konstantin Pribluda 017 * @version $Revision: 1575 $ 018 */ 019 public class ConstantParameterTestCase extends TestCase { 020 021 /** 022 * constant parameter with instance type shall verify for expected primitives 023 */ 024 public void testThatInstaceTypeAcceptedForPrimitives() throws Exception { 025 ConstantParameter param = new ConstantParameter(new Integer(239)); 026 try{ 027 param.verify(null,null,Integer.TYPE); 028 } catch(PicoIntrospectionException ex) { 029 fail("failed verification for primitive / instance "); 030 } 031 } 032 }