diff options
author | Mark Rekveld <mark.rekveld@sonarsource.com> | 2020-09-28 13:21:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 13:21:48 +0200 |
commit | d9376179e8d3fe1534f0c0d3ef3f04db78d4d85e (patch) | |
tree | f34df9dcf95f50d0dc28836ef26b65792cc468f7 /src/test/java/org | |
parent | 22b155a580d6ac9d09e15259afd92e4e853c7799 (diff) | |
download | sonar-scanner-cli-d9376179e8d3fe1534f0c0d3ef3f04db78d4d85e.tar.gz sonar-scanner-cli-d9376179e8d3fe1534f0c0d3ef3f04db78d4d85e.zip |
SQSCANNER-67 - Warn on duplicate property definitions (#89)
Diffstat (limited to 'src/test/java/org')
-rw-r--r-- | src/test/java/org/sonarsource/scanner/cli/CliTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/CliTest.java b/src/test/java/org/sonarsource/scanner/cli/CliTest.java index 5a81e11..2c49c34 100644 --- a/src/test/java/org/sonarsource/scanner/cli/CliTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/CliTest.java @@ -48,6 +48,14 @@ public class CliTest { } @Test + public void should_warn_on_duplicate_properties() { + logs = mock(Logs.class); + cli = new Cli(exit, logs); + cli.parse(new String[] {"-D", "foo=bar", "--define", "foo=baz"}); + verify(logs).warn("Property 'foo' with value 'bar' is overridden with value 'baz'"); + } + + @Test public void should_fail_on_missing_prop() { logs = mock(Logs.class); cli = new Cli(exit, logs); |