001 package org.picocontainer;
002
003 import static org.junit.Assert.assertNotNull;
004
005 import java.util.HashMap;
006 import org.junit.Test;
007
008 public class CharacteristicsTestCase {
009
010 @Test(expected=UnsupportedOperationException.class)
011 public void testCharacteristicsAreImmutable() {
012 assertNotNull(Characteristics.CDI.toString());
013 Characteristics.CDI.remove("injection");
014 }
015
016 @Test(expected=UnsupportedOperationException.class)
017 public void testSetPropertyIsNotAllowed() {
018 assertNotNull(Characteristics.CDI.toString());
019 Characteristics.CDI.setProperty("injection","true");
020 }
021
022 @Test(expected=UnsupportedOperationException.class)
023 public void testHashmapPutIsNotAllowed() {
024 assertNotNull(Characteristics.CDI.toString());
025 Characteristics.CDI.put("injection","true");
026 }
027
028 @Test(expected=UnsupportedOperationException.class)
029 public void testHashMapPutAllIsNotAllowed() {
030 assertNotNull(Characteristics.CDI.toString());
031 Characteristics.CDI.putAll(new HashMap<String,String>());
032 }
033
034 }