reformat code
[yosql.git] / yosql-tooling / yosql-tooling-maven / src / test / java / wtf / metio / yosql / TestSqlFiles.java
blob921f11a69f4b1a01c357a989803bb4f9581080db
1 /*
2 * This file is part of yosql. It is subject to the license terms in the LICENSE file found in the top-level
3 * directory of this distribution and at https://creativecommons.org/publicdomain/zero/1.0/. No part of yosql,
4 * including this file, may be copied, modified, propagated, or distributed except according to the terms contained
5 * in the LICENSE file.
6 */
7 package wtf.metio.yosql;
9 import java.net.URI;
10 import java.net.URISyntaxException;
11 import java.net.URL;
12 import java.nio.file.Path;
13 import java.nio.file.Paths;
15 /**
18 public final class TestSqlFiles {
20 /**
21 * @param relativeLocation The location of the SQL file to load.
22 * @return The full path to the SQL file.
24 public static Path getFullPath(final String relativeLocation) {
25 try {
26 final URL resource = TestSqlFiles.class.getResource(relativeLocation);
27 final URI uri = resource.toURI();
28 return Paths.get(uri);
29 } catch (final URISyntaxException exception) {
30 throw new IllegalArgumentException(exception);