Hi,
I am extending the AbstractDataBrokerTest for writing my unit TCs. As part of
AbstractDataBrokerTest -> setupWithSchema(), DataBrokerTestCustomizer is
instantiated where the SchemaContext is being registered with the
SchemaService. But the SchemaContext is always null. Is there any issues in the
org.opendaylight.controller.md.sal.binding.test.DataBrokerTestCustomizer ? I am
using Boron SR3 release
public class AbstractDataBrokerTest extends AbstractSchemaAwareTest {
private DataBrokerTestCustomizer testCustomizer;
private DataBroker dataBroker;
private DOMDataBroker domBroker;
@Override
protected void setupWithSchema(final SchemaContext context) {
testCustomizer = createDataBrokerTestCustomizer();
dataBroker = testCustomizer.createDataBroker();
...
...
...
}
}
public class DataBrokerTestCustomizer {
private DOMDataBroker domDataBroker;
private final DOMNotificationRouter domNotificationRouter;
private final MockSchemaService schemaService;
...
....
public DataBrokerTestCustomizer() {
schemaService = new MockSchemaService();
final ClassPool pool = ClassPool.getDefault();
final DataObjectSerializerGenerator generator =
StreamWriterGenerator.create(JavassistUtils.forClassPool(pool));
final BindingNormalizedNodeCodecRegistry codecRegistry = new
BindingNormalizedNodeCodecRegistry(generator);
final GeneratedClassLoadingStrategy loading =
GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy();
bindingToNormalized = new BindingToNormalizedNodeCodec(loading,
codecRegistry);
schemaService.registerSchemaContextListener(bindingToNormalized);
}
Regards
-Satish
_______________________________________________
controller-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/controller-dev