2 * Copyright (c) 2016 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.yang2sources.plugin;
11 import java.io.InputStream;
12 import org.junit.Assert;
13 import org.junit.Test;
15 public class YangSourceFromFileTest {
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());