2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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
9 package org.opendaylight.mdsal.binding.javav2.runtime.context;
11 import static org.junit.Assert.assertNotNull;
13 import java.io.FileNotFoundException;
14 import java.net.URISyntaxException;
15 import org.junit.Before;
16 import org.junit.Test;
17 import org.opendaylight.mdsal.binding.javav2.generator.impl.GeneratedClassLoadingStrategy;
18 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
20 public class ModuleInfoBackedContextTest {
22 private ModuleInfoBackedContext moduleInfoBackedContext;
25 public void setup() throws ReactorException, FileNotFoundException, URISyntaxException {
26 moduleInfoBackedContext = ModuleInfoBackedContext.create();
30 public void createTestWithStrategy() {
31 assertNotNull(ModuleInfoBackedContext.create(
32 GeneratedClassLoadingStrategy.getTCCLClassLoadingStrategy()));
35 @Test(expected = ClassNotFoundException.class)
36 public void loadClassTest() throws ClassNotFoundException {
37 moduleInfoBackedContext.loadClass("org.opendaylight.mdsal.gen.javav2.test.rev990939.Dummy");