2 * Copyright (c) 2013 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.sal.binding.generator.impl;
10 import com.google.common.base.Preconditions;
12 import java.net.URISyntaxException;
14 import java.util.HashSet;
16 import org.junit.Before;
18 public abstract class AbstractTypesTest {
20 private final URL testSourcesDirUrl;
21 protected Set<File> testModels;
23 AbstractTypesTest(final URL testSourcesDirUrl) {
24 this.testSourcesDirUrl = testSourcesDirUrl;
28 public void loadTestResources() throws URISyntaxException {
29 File testSourcesDir = new File(testSourcesDirUrl.toURI());
30 File[] testFiles = Preconditions.checkNotNull(testSourcesDir.listFiles(), testSourcesDir
31 + " does not denote a directory");
32 testModels = new HashSet<>();
33 for (File file : testFiles) {