All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.picocontainer.CharacteristicsTestCase Maven / Gradle / Ivy

There is a newer version: 2.15
Show newest version
package org.picocontainer;

import static org.junit.Assert.assertNotNull;

import java.util.HashMap;
import org.junit.Test;

public class CharacteristicsTestCase  {

    @Test(expected=UnsupportedOperationException.class)    
    public void testCharacteristicsAreImmutable() {
        assertNotNull(Characteristics.CDI.toString());
        Characteristics.CDI.remove("injection");
    }
    
    @Test(expected=UnsupportedOperationException.class)
    public void testSetPropertyIsNotAllowed() {
        assertNotNull(Characteristics.CDI.toString());
        Characteristics.CDI.setProperty("injection","true");    	
    }
    
    @Test(expected=UnsupportedOperationException.class)
    public void testHashmapPutIsNotAllowed() {
        assertNotNull(Characteristics.CDI.toString());
        Characteristics.CDI.put("injection","true");    	
    }
    
    @Test(expected=UnsupportedOperationException.class)
    public void testHashMapPutAllIsNotAllowed() {
        assertNotNull(Characteristics.CDI.toString());
        Characteristics.CDI.putAll(new HashMap());    	
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy