2 * Copyright (c) 2014 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.mdsal.binding.dom.codec.impl;
10 import org.junit.AfterClass;
11 import org.junit.BeforeClass;
12 import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext;
13 import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
14 import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
15 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
17 public abstract class AbstractBindingRuntimeTest {
19 private static SchemaContext schemaContext;
20 private static BindingRuntimeContext runtimeContext;
23 public static void beforeClass() {
24 ModuleInfoBackedContext ctx = ModuleInfoBackedContext.create();
25 ctx.addModuleInfos(BindingReflections.loadModuleInfos());
26 schemaContext = ctx.tryToCreateSchemaContext().get();
27 runtimeContext = BindingRuntimeContext.create(ctx, schemaContext);
31 public static void afterClass() {
33 runtimeContext = null;
36 public static final SchemaContext getSchemaContext() {
40 public static final BindingRuntimeContext getRuntimeContext() {
41 return runtimeContext;