diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-09-18 11:33:18 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-09-19 08:56:33 +0200 |
commit | af30430e1577d2284a1fce12f8a8a43652627461 (patch) | |
tree | f283f08696b9ee015ccdad0c04d66f116774e6b8 /sonar-batch/src/test/java | |
parent | 8b80e32f4e020ecc82b6e4fd6fd01b5d9374167a (diff) | |
download | sonarqube-af30430e1577d2284a1fce12f8a8a43652627461.tar.gz sonarqube-af30430e1577d2284a1fce12f8a8a43652627461.zip |
SONAR-6834 complete filtering paramters of api/ce/activity
Diffstat (limited to 'sonar-batch/src/test/java')
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java b/sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java new file mode 100644 index 00000000000..7926172f078 --- /dev/null +++ b/sonar-batch/src/test/java/org/sonar/batch/util/BatchUtilsTest.java @@ -0,0 +1,35 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.batch.util; + +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +public class BatchUtilsTest { + + @Test + public void encodeForUrl() throws Exception { + assertThat(BatchUtils.encodeForUrl(null)).isEqualTo(""); + assertThat(BatchUtils.encodeForUrl("")).isEqualTo(""); + assertThat(BatchUtils.encodeForUrl("foo")).isEqualTo("foo"); + assertThat(BatchUtils.encodeForUrl("foo&bar")).isEqualTo("foo%26bar"); + } +} |