Hi Antonin,

Many thanks for your reply. I have already seen these examples. My question
was concerning the access to the properties. I modified my unit test as
follows:

@RunWith(CamelCdiRunner.class)
public class UnitTests extends CamelTestSupport
{
  @Inject
  @ConfigProperty(name = "ftp.path")
  private static String myProp;
  @Inject
  private CamelContext context;

  @Test
  public void test()
  {
    System.out.println ("*** myProp: " + myProp);
    assertEquals(context.getStatus(), ServiceStatus.Started);
  }
} 

running the test I get:

*** myProp: null

So, in the route builder class I can see the properties in
apache-deltaspike.properties but not in the unit test. Hence, my question
was what am I supposed to do here as I don't want to duplicate the code in
public PropertiesComponent properties(PropertiesParser parser).

Kind regards,

Nicolas





--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-delta-spike-How-to-share-properties-between-contexts-tp5783288p5783297.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to