1 package org.codehaus.plexus.component; 2 3 import org.codehaus.plexus.PlexusTestCase; 4 import org.codehaus.plexus.context.Context; 5 import org.codehaus.plexus.context.ContextException; 6 7 public class PlexusTestCaseTest extends PlexusTestCase { 8 9 private static final String CUSTOM_PROPERTY = "custom.property"; 10 private static final String CUSTOM_VALUE = "custom.value"; 11 12 @Override 13 protected void customizeContext(Context context) { 14 super.customizeContext(context); 15 16 context.put(CUSTOM_PROPERTY, CUSTOM_VALUE); 17 } 18 19 public void testCustomizeContext() throws ContextException { 20 String value = (String) getContainer().getContext().get(CUSTOM_PROPERTY); 21 22 assertEquals(CUSTOM_VALUE, value); 23 } 24 }