Removed usage of deprecated YangParserImpl from tests in mdsal project
[mdsal.git] / binding / mdsal-binding-java-api-generator / src / test / java / org / opendaylight / yangtools / sal / java / api / generator / test / BaseCompilationTest.java
1 /*
2  * Copyright (c) 2016 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.yangtools.sal.java.api.generator.test;
9
10 import static org.junit.Assert.assertTrue;
11
12 import org.junit.Before;
13 import org.junit.BeforeClass;
14 import org.opendaylight.yangtools.sal.binding.generator.api.BindingGenerator;
15 import org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl;
16
17 public abstract class BaseCompilationTest {
18
19     protected BindingGenerator bindingGenerator;
20
21     @BeforeClass
22     public static void createTestDirs() {
23         if (CompilationTestUtils.TEST_DIR.exists()) {
24             CompilationTestUtils.deleteTestDir(CompilationTestUtils.TEST_DIR);
25         }
26         assertTrue(CompilationTestUtils.GENERATOR_OUTPUT_DIR.mkdirs());
27         assertTrue(CompilationTestUtils.COMPILER_OUTPUT_DIR.mkdirs());
28     }
29
30     @Before
31     public void init() {
32         bindingGenerator = new BindingGeneratorImpl(true);
33     }
34
35 }