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.yangtools.binding.data.codec.test;
10 import org.junit.Before;
11 import org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext;
12 import org.opendaylight.yangtools.sal.binding.generator.util.BindingRuntimeContext;
13 import org.opendaylight.yangtools.yang.binding.util.BindingReflections;
14 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
16 public abstract class AbstractBindingRuntimeTest {
18 private SchemaContext schemaContext;
19 private BindingRuntimeContext runtimeContext;
23 ModuleInfoBackedContext ctx = ModuleInfoBackedContext.create();
24 ctx.addModuleInfos(BindingReflections.loadModuleInfos());
25 schemaContext = ctx.tryToCreateSchemaContext().get();
26 runtimeContext = BindingRuntimeContext.create(ctx, schemaContext);
30 public SchemaContext getSchemaContext() {
34 public BindingRuntimeContext getRuntimeContext() {
35 return runtimeContext;