public enum TestUtils extends Enum<TestUtils>
Modifier and Type | Method and Description |
---|---|
static Path |
copyDirectory(Path source,
Path destination)
Copy all the files and sub-directories under source directory to destination directory
recursively.
|
static Path |
getResource(String resourceNameRegex)
Searches for a resource file matching the given regex in the given directory.
|
static TestUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TestUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static TestUtils[] values()
for (TestUtils c : TestUtils.values()) System.out.println(c);
public static TestUtils valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Path getResource(String resourceNameRegex)
Path
fields for
resource file(i.e. jar, config file) that reside in the modules target
directory.resourceNameRegex
- regex pattern to match againstRuntimeException
- if none or multiple resource files could be foundpublic static Path copyDirectory(Path source, Path destination) throws IOException
source
- directory or file path to copy from.destination
- directory or file path to copy to.IOException
- if any IO error happen.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.