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.mdsal.binding.generator.impl;
10 import static java.util.Objects.requireNonNull;
13 import java.net.URISyntaxException;
15 import java.util.HashSet;
17 import org.junit.Before;
19 public abstract class AbstractTypesTest {
21 private final URL testSourcesDirUrl;
22 protected Set<File> testModels;
24 AbstractTypesTest(final URL testSourcesDirUrl) {
25 this.testSourcesDirUrl = testSourcesDirUrl;
29 public void loadTestResources() throws URISyntaxException {
30 File testSourcesDir = new File(testSourcesDirUrl.toURI());
31 File[] testFiles = requireNonNull(testSourcesDir.listFiles(), testSourcesDir + " does not denote a directory");
32 testModels = new HashSet<>();
33 for (File file : testFiles) {