5286855d4026ce38d2274838e6e755f1950249c5
[yangtools.git] / yang / yang-maven-plugin / src / test / java / org / opendaylight / yangtools / yang2sources / plugin / YangSourceFromFileTest.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.yang2sources.plugin;
9
10 import java.io.File;
11 import java.io.InputStream;
12 import org.junit.Assert;
13 import org.junit.Test;
14
15 public class YangSourceFromFileTest {
16
17     @Test
18     public void yangSourceFromFileTest() throws Exception {
19         final File source = new File(getClass().getResource("/yang-source-from-file.yang").getFile());
20         final YangSourceFromFile yangSource = new YangSourceFromFile(source);
21         final InputStream openStream = yangSource.openStream();
22         Assert.assertNotNull(openStream);
23         Assert.assertEquals(541, yangSource.size());
24     }
25
26 }