96a4d57a00d97f3a8ec9e36b0bccd84e13c551f0
[controller.git] / opendaylight / sal / yang-prototype / code-generator / maven-yang-plugin / src / test / java / org / opendaylight / controller / yang2sources / plugin / UtilTest.java
1 /*
2  * Copyright (c) 2013 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.controller.yang2sources.plugin;
9
10 import org.junit.Test;
11
12 import java.io.File;
13 import java.io.FileNotFoundException;
14 import java.util.Collection;
15
16 import static org.junit.Assert.assertTrue;
17
18 public class UtilTest {
19
20     @Test
21     public void testCache() throws FileNotFoundException {
22         String yang = new File(getClass().getResource("/mock.yang").getFile())
23                 .getParent();
24         Collection<File> files = Util.listFiles(new File(yang));
25         Collection<File> files2 = Util.listFiles(new File(yang));
26         assertTrue(files == files2);
27     }
28
29 }