nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Bateman <r...@windofkeltia.com>
Subject Telescopic controller services in test framework...
Date Mon, 15 May 2017 19:31:21 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message