60309830e50eb94c5f3e3d8efe64b30c4af5211b
[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 public class AbstractNotificationBrokerTest extends AbstractSchemaAwareTest{
17     private BindingToNormalizedNodeCodec bindingToNormalizedNodeCodec;
18     private DOMNotificationRouter domNotificationRouter;
19     private NotificationService notificationService;
20     private NotificationPublishService notificationPublishService;
21
22
23     @Override
24     protected void setupWithSchema(final SchemaContext context) {
25         final DataBrokerTestCustomizer testCustomizer = createDataBrokerTestCustomizer();
26         domNotificationRouter = testCustomizer.getDomNotificationRouter();
27         notificationService = testCustomizer.createNotificationService();
28         notificationPublishService = testCustomizer.createNotificationPublishService();
29         bindingToNormalizedNodeCodec = testCustomizer.getBindingToNormalized();
30         testCustomizer.updateSchema(context);
31     }
32
33     protected DataBrokerTestCustomizer createDataBrokerTestCustomizer() {
34         return new DataBrokerTestCustomizer();
35     }
36
37     public NotificationService getNotificationService() {
38         return notificationService;
39     }
40
41     public NotificationPublishService getNotificationPublishService() {
42         return notificationPublishService;
43     }
44
45     public DOMNotificationRouter getDomNotificationRouter() {
46         return domNotificationRouter;
47     }
48
49     public BindingToNormalizedNodeCodec getBindingToNormalizedNodeCodec() {
50         return bindingToNormalizedNodeCodec;
51     }
52 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.