aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/test
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-07-29 17:43:05 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-07-29 17:43:05 +0200
commit2ad5e41e3cce45040b4c5edbe19d09be640c293d (patch)
tree47751511ad3e77e324172a99a3aa5d963dd7f050 /sonar-ws-client/src/test
parent93d8dec0e5eb0fc6da292f6409a460aa0c9e86b6 (diff)
downloadsonarqube-2ad5e41e3cce45040b4c5edbe19d09be640c293d.tar.gz
sonarqube-2ad5e41e3cce45040b4c5edbe19d09be640c293d.zip
Fix wsclient of POST /api/manual_mesasures with integer values
Diffstat (limited to 'sonar-ws-client/src/test')
-rw-r--r--sonar-ws-client/src/test/java/org/sonar/wsclient/services/ManualMeasureCreateQueryTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ManualMeasureCreateQueryTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ManualMeasureCreateQueryTest.java
index 1a191df8d7a..6231876a75e 100644
--- a/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ManualMeasureCreateQueryTest.java
+++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/services/ManualMeasureCreateQueryTest.java
@@ -35,8 +35,15 @@ public class ManualMeasureCreateQueryTest extends QueryTestCase {
@Test
public void shouldCreateWithAllOptionalProperties() {
- ManualMeasureCreateQuery query = ManualMeasureCreateQuery.create("foo", "team_size").setValue(3.14).setTextValue("xxx").setDescription("yyy");
- assertThat(query.getUrl(), is("/api/manual_measures?resource=foo&metric=team_size&val=3.14&text=xxx&desc=yyy&"));
+ ManualMeasureCreateQuery query = ManualMeasureCreateQuery.create("foo", "burned_budget").setValue(3.14).setTextValue("xxx").setDescription("yyy");
+ assertThat(query.getUrl(), is("/api/manual_measures?resource=foo&metric=burned_budget&val=3.14&text=xxx&desc=yyy&"));
+ assertThat(query.getModelClass().getName(), is(ManualMeasure.class.getName()));
+ }
+
+ @Test
+ public void shouldSetIntValue() {
+ ManualMeasureCreateQuery query = ManualMeasureCreateQuery.create("foo", "team_size").setIntValue(45);
+ assertThat(query.getUrl(), is("/api/manual_measures?resource=foo&metric=team_size&val=45&"));
assertThat(query.getModelClass().getName(), is(ManualMeasure.class.getName()));
}
} \ No newline at end of file