Skip to content

Commit

Permalink
add Diva (enableTransactionAnalysis) support to tooling (#1531)
Browse files Browse the repository at this point in the history
Signed-off-by: John Steele <programjsteele@gmail.com>

Signed-off-by: John Steele <programjsteele@gmail.com>
  • Loading branch information
johnsteele committed Oct 7, 2022
1 parent f73e77c commit 227336c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Expand Up @@ -177,6 +177,9 @@ public Map<String, Object> collectOptions() {
// enableClassNotFoundAnalysis
options.put(IOptionKeys.ENABLE_CLASS_NOT_FOUND_ANALYSIS, this.enableClassNotFoundAnalysis());

// enableTransactionAnalysis
options.put(IOptionKeys.ENABLE_TRANSACTION_ANALYSIS, this.enableTransactionAnalysis());

// enableTattletale
options.put(IOptionKeys.ENABLE_TATTLETALE, this.enableTattletale());

Expand Down Expand Up @@ -332,6 +335,11 @@ private boolean enableClassNotFoundAnalysis() {
return this.arguments.contains(toArg(IOptionKeys.ENABLE_CLASS_NOT_FOUND_ANALYSIS));
}

// enableTransactionAnalysis
private boolean enableTransactionAnalysis() {
return this.arguments.contains(toArg(IOptionKeys.ENABLE_TRANSACTION_ANALYSIS));
}

// enableTattletale
private boolean enableTattletale() {
return this.arguments.contains(toArg(IOptionKeys.ENABLE_TATTLETALE));
Expand Down
Expand Up @@ -61,12 +61,14 @@ public void testBoolean() throws Exception {
String mavenize = "--mavenize";
String online = "--online";
String disableTattletale = "--disableTattletale";
List<String> args = Lists.newArrayList(mavenize, online, disableTattletale);
String enableTransactionAnalysis = "--enableTransactionAnalysis";
List<String> args = Lists.newArrayList(mavenize, online, disableTattletale, enableTransactionAnalysis);
ToolingModeCommand command = new ToolingModeCommand(args);
Map<String, Object> options = command.collectOptions();
Assert.assertTrue((Boolean) options.get("mavenize"));
Assert.assertTrue((Boolean) options.get("online"));
Assert.assertTrue((Boolean) options.get("disableTattletale"));
Assert.assertTrue((Boolean) options.get("enableTransactionAnalysis"));
Assert.assertFalse((Boolean) options.get("exportCSV"));
}
}
Expand Up @@ -24,6 +24,7 @@ public interface IOptionKeys {
public static final String INCLUDE_TAGS = "includeTags";
public static final String ONLINE = "online";
public static final String ENABLE_CLASS_NOT_FOUND_ANALYSIS = "enableClassNotFoundAnalysis";
public static final String ENABLE_TRANSACTION_ANALYSIS = "enableTransactionAnalysis";
public static final String ENABLE_TATTLETALE = "enableTattletale";
public static final String EXPLODED_APP = "explodedApp";
public static final String KEEP_WORK_DIRS = "keepWorkDirs";
Expand Down

0 comments on commit 227336c

Please sign in to comment.