2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.md.sal.binding.test;
10 import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
11 import org.opendaylight.controller.md.sal.binding.api.NotificationService;
12 import org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec;
13 import org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter;
14 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
17 public class AbstractNotificationBrokerTest extends AbstractSchemaAwareTest {
19 private BindingToNormalizedNodeCodec bindingToNormalizedNodeCodec;
20 private DOMNotificationRouter domNotificationRouter;
21 private NotificationService notificationService;
22 private NotificationPublishService notificationPublishService;
25 protected void setupWithSchema(final SchemaContext context) {
26 final DataBrokerTestCustomizer testCustomizer = createDataBrokerTestCustomizer();
27 domNotificationRouter = testCustomizer.getDomNotificationRouter();
28 notificationService = testCustomizer.createNotificationService();
29 notificationPublishService = testCustomizer.createNotificationPublishService();
30 bindingToNormalizedNodeCodec = testCustomizer.getBindingToNormalized();
31 testCustomizer.updateSchema(context);
34 protected DataBrokerTestCustomizer createDataBrokerTestCustomizer() {
35 return new DataBrokerTestCustomizer();
38 public NotificationService getNotificationService() {
39 return notificationService;
42 public NotificationPublishService getNotificationPublishService() {
43 return notificationPublishService;
46 public DOMNotificationRouter getDomNotificationRouter() {
47 return domNotificationRouter;
50 public BindingToNormalizedNodeCodec getBindingToNormalizedNodeCodec() {
51 return bindingToNormalizedNodeCodec;