Migrate OSGI compendium reference
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / test / java / org / opendaylight / controller / md / sal / binding / test / AbstractNotificationBrokerTest.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.binding.test;
9
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;
15
16 @Deprecated
17 public class AbstractNotificationBrokerTest extends AbstractSchemaAwareTest {
18
19     private BindingToNormalizedNodeCodec bindingToNormalizedNodeCodec;
20     private DOMNotificationRouter domNotificationRouter;
21     private NotificationService notificationService;
22     private NotificationPublishService notificationPublishService;
23
24     @Override
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);
32     }
33
34     protected DataBrokerTestCustomizer createDataBrokerTestCustomizer() {
35         return new DataBrokerTestCustomizer();
36     }
37
38     public NotificationService getNotificationService() {
39         return notificationService;
40     }
41
42     public NotificationPublishService getNotificationPublishService() {
43         return notificationPublishService;
44     }
45
46     public DOMNotificationRouter getDomNotificationRouter() {
47         return domNotificationRouter;
48     }
49
50     public BindingToNormalizedNodeCodec getBindingToNormalizedNodeCodec() {
51         return bindingToNormalizedNodeCodec;
52     }
53 }