use of org.springframework.test.context.DynamicPropertySource in project pathling by aehrc.
the class SecurityTestForResources method registerProperties.
@DynamicPropertySource
@SuppressWarnings("unused")
static void registerProperties(final DynamicPropertyRegistry registry) {
// TODO: This is a bit messy - maybe we should abstract the physical warehouse out, so that it
// could be mocked
final File warehouseDir = new File(testRootDir, "default");
assertTrue(warehouseDir.mkdir());
registry.add("pathling.storage.warehouseUrl", () -> "file://" + testRootDir.toPath().toString().replaceFirst("/$", ""));
}
use of org.springframework.test.context.DynamicPropertySource in project pathling by aehrc.
the class ManifestConverterTest method registerProperties.
@DynamicPropertySource
@SuppressWarnings("unused")
static void registerProperties(@Nonnull final DynamicPropertyRegistry registry) {
final File warehouseDirectory = new File("src/test/resources/test-data");
registry.add("pathling.storage.warehouseUrl", () -> "file://" + warehouseDirectory.getAbsoluteFile().toPath().toString().replaceFirst("/$", ""));
}
Aggregations