Search in sources :

Example 1 with Builder

use of org.apache.nifi.bundle.BundleDetails.Builder in project nifi-minifi by apache.

the class FlowEnricherTest method generateBundle.

private static Bundle generateBundle(String group, String id, String version, BundleCoordinate dependencyCoordinate) {
    final File workingDirectory = new File("src/test/resources");
    final BundleCoordinate bundleCoordinate = new BundleCoordinate(group, id, version);
    final String buildTag = "HEAD";
    final String buildRevision = "1";
    final String buildBranch = "DEV";
    final String buildTimestamp = "2017-01-01 00:00:00";
    final String buildJdk = "JDK8";
    final String builtBy = "somebody";
    Builder bundleBuilder = new Builder().workingDir(workingDirectory).coordinate(bundleCoordinate).buildTag(buildTag).buildRevision(buildRevision).buildBranch(buildBranch).buildTimestamp(buildTimestamp).buildJdk(buildJdk).builtBy(builtBy);
    if (dependencyCoordinate != null) {
        bundleBuilder.dependencyCoordinate(dependencyCoordinate);
    }
    return new Bundle(bundleBuilder.build(), mockClassLoader);
}
Also used : Bundle(org.apache.nifi.bundle.Bundle) Builder(org.apache.nifi.bundle.BundleDetails.Builder) Matchers.anyString(org.mockito.Matchers.anyString) File(java.io.File) BundleCoordinate(org.apache.nifi.bundle.BundleCoordinate)

Aggregations

File (java.io.File)1 Bundle (org.apache.nifi.bundle.Bundle)1 BundleCoordinate (org.apache.nifi.bundle.BundleCoordinate)1 Builder (org.apache.nifi.bundle.BundleDetails.Builder)1 Matchers.anyString (org.mockito.Matchers.anyString)1