Skip to content
Snippets Groups Projects
Commit 39f62eff authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

test

parent a8656501
No related branches found
No related tags found
1 merge request!793Test Web Service
......@@ -232,6 +232,7 @@ NSHM Tests:
matrix:
- NSHM: Alaska2007
- NSHM: Alaska2023
- NSHM: WebAlaska2023
- NSHM: Conus2018
- NSHM: Conus2023
- NSHM: Hawaii2021
......
......@@ -114,6 +114,28 @@ class NshmTestUtils {
context.close();
}
/**
* Test a NSHM.
*
* @param nshm The NSHM to test
* @throws ExecutionException
* @throws InterruptedException
*/
static void testWebNshm(Nshm nshm, Optional<Path> dataPath)
throws InterruptedException, ExecutionException {
var context = Micronaut
.build("--model=nshms/" + String.format("%s-%s", nshm.nshmInfo.repo, nshm.nshmInfo.year))
.mainClass(Application.class)
.start();
for (NamedLocation location : nshm.locations()) {
LOGGER.info("Location: " + location.toString());
compareWebCurves(nshm, location, dataPath);
}
context.close();
}
/**
* Write expected values
*
......
......@@ -149,6 +149,19 @@ class NshmTests {
NshmTestUtils.testNshm(nshm, getDataPath(nshm));
}
/**
* Test Alaska 2023 NSHM
*
* To run test: ./gradlew testWebAlaska2023
* @throws ExecutionException
* @throws InterruptedException
*/
@Test
final void testWebAlaska2023() throws IOException, InterruptedException, ExecutionException {
Nshm nshm = NSHMS.get("nshm-alaska-2023");
NshmTestUtils.testWebNshm(nshm, getDataPath(nshm));
}
/**
* Test CONUS 2018 NSHM
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment