Make DOMSchemaService operate of EffectiveModelContext
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / test / java / org / opendaylight / mdsal / binding / dom / adapter / test / AbstractDataBrokerTest.java
1 /*
2  * Copyright (c) 2014 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.mdsal.binding.dom.adapter.test;
9
10 import org.opendaylight.mdsal.binding.api.DataBroker;
11 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
12
13 /**
14  * Abstract base for DataBroker tests. Note that it performs synchronous commits via a direct executor which can cause
15  * issues if used in a concurrent manner so it is recommended to use AbstractConcurrentDataBrokerTest instead.
16  */
17 public class AbstractDataBrokerTest extends AbstractBaseDataBrokerTest {
18     @Override
19     protected AbstractDataBrokerTestCustomizer createDataBrokerTestCustomizer() {
20         return new DataBrokerTestCustomizer();
21     }
22
23     @Override
24     protected void setupWithSchema(final EffectiveModelContext context) {
25         super.setupWithSchema(context);
26         setupWithDataBroker(getDataBroker());
27     }
28
29     protected void setupWithDataBroker(final DataBroker dataBroker) {
30         // Intentionally left No-op, subclasses may customize it
31     }
32 }