View Javadoc
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
8       extends PlexusTestCase
9   {
10      
11      private static final String CUSTOM_PROPERTY = "custom.property";
12      private static final String CUSTOM_VALUE = "custom.value";
13  
14      @Override
15      protected void customizeContext( Context context )
16      {
17          super.customizeContext( context );
18          
19          context.put( CUSTOM_PROPERTY, CUSTOM_VALUE );
20      }
21      
22      public void testCustomizeContext() throws ContextException
23      {
24          String value = (String) getContainer().getContext().get( CUSTOM_PROPERTY );
25          
26          assertEquals( CUSTOM_VALUE, value );
27      }
28  }