diff options
Diffstat (limited to 'sonar-ws-client/src/test')
-rw-r--r-- | sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java | 6 | ||||
-rw-r--r-- | sonar-ws-client/src/test/resources/violations/false-positive.json | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java index 4652c2cd9d9..16e07efff38 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/unmarshallers/ViolationUnmarshallerTest.java @@ -53,7 +53,7 @@ public class ViolationUnmarshallerTest extends UnmarshallerTestCase { assertThat(violation.getResourceName(), is("TraceableResourceLimitingPool")); assertThat(violation.getResourceQualifier(), is("CLA")); assertThat(violation.getResourceScope(), is("FIL")); - assertThat(violation.isFalsePositive(), is(false)); + assertThat(violation.isSwitchedOff(), is(false)); assertThat(violation.getReviewId(), nullValue()); } @@ -67,9 +67,9 @@ public class ViolationUnmarshallerTest extends UnmarshallerTestCase { } @Test - public void testFalsePositive() { + public void testSwitchedOff() { Violation violation = new ViolationUnmarshaller().toModel(loadFile("/violations/false-positive.json")); - assertThat(violation.isFalsePositive(), is(true)); + assertThat(violation.isSwitchedOff(), is(true)); assertThat(violation.getReviewId(), is(123L)); } diff --git a/sonar-ws-client/src/test/resources/violations/false-positive.json b/sonar-ws-client/src/test/resources/violations/false-positive.json index d84cb1528d5..2165e9455c1 100644 --- a/sonar-ws-client/src/test/resources/violations/false-positive.json +++ b/sonar-ws-client/src/test/resources/violations/false-positive.json @@ -1,3 +1,3 @@ [ - {"message":"throw java.lang.Exception","falsePositive": true, "review": 123, "priority":"MAJOR","rule":{"key":"pmd:SignatureDeclareThrowsException","name":"Signature Declare Throws Exception","category":"Maintainability"},"resource":{"key":"org.apache.excalibur.components:excalibur-pool-instrumented:org.apache.avalon.excalibur.pool.TraceableResourceLimitingPool","name":"TraceableResourceLimitingPool","scope":"FIL","qualifier":"CLA","language":"java"}} + {"message":"throw java.lang.Exception","switchedOff": true, "review": 123, "priority":"MAJOR","rule":{"key":"pmd:SignatureDeclareThrowsException","name":"Signature Declare Throws Exception","category":"Maintainability"},"resource":{"key":"org.apache.excalibur.components:excalibur-pool-instrumented:org.apache.avalon.excalibur.pool.TraceableResourceLimitingPool","name":"TraceableResourceLimitingPool","scope":"FIL","qualifier":"CLA","language":"java"}} ]
\ No newline at end of file |