I've written a controller service that depends on another controller service. One of the properties in the first service builds itself using .identifiesControllerService( Service2.class ), but no .allowableValues()because it was unclear what to put.

In my test code, I'm struggling as to how to reflect this relationship.

   TestRunner runner = TestRunners.newTestRunner( SomeProcessor.class );
   Service1 service1 = new Service1();
   Service2 service2 = new Service2();

   runner.addControllerService( "foo",  service1 );
   runner.setProperty( service1, ..., "" );              // typical
   setProperty() call
   *runner.setProperty( service1, ..., service2 );  // this won't
   compile; it's not an allowable value*

   runner.enableControllerService( service1 );
   runner.assertValid( service1 );
   etc.

How is this really done?

Thanks.

Reply via email to