diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-08 15:03:28 +0000 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2010-11-08 15:03:28 +0000 |
commit | 4da46394fddf9e62501f274d4f92188b0557d0ae (patch) | |
tree | 6b13f4dbfb9916eb2c4973c43941a2bccf85fa04 /tests | |
parent | 1100052ef3d407fe56180f6d07c921a94006d9b8 (diff) | |
download | sonarqube-4da46394fddf9e62501f274d4f92188b0557d0ae.tar.gz sonarqube-4da46394fddf9e62501f274d4f92188b0557d0ae.zip |
SONAR-1852 add IT
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/tests/src/it/java/org/sonar/tests/integration/Struts139Test.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/integration/tests/src/it/java/org/sonar/tests/integration/Struts139Test.java b/tests/integration/tests/src/it/java/org/sonar/tests/integration/Struts139Test.java index 690ebd7c6e7..0ffda3a252c 100644 --- a/tests/integration/tests/src/it/java/org/sonar/tests/integration/Struts139Test.java +++ b/tests/integration/tests/src/it/java/org/sonar/tests/integration/Struts139Test.java @@ -24,11 +24,14 @@ import org.junit.Test; import org.sonar.wsclient.Sonar; import org.sonar.wsclient.services.*; +import java.util.Date; import java.util.List; import static org.hamcrest.core.Is.is; import static org.hamcrest.number.OrderingComparisons.greaterThan; +import static org.hamcrest.number.OrderingComparisons.greaterThanOrEqualTo; import static org.hamcrest.number.OrderingComparisons.lessThan; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; /** @@ -51,6 +54,13 @@ public class Struts139Test { } @Test + public void shouldReturnAnalysisDate() { + Date date = sonar.find(new ResourceQuery(PROJECT_STRUTS)).getDate(); + assertNotNull(date); + assertThat(date.getYear(), greaterThanOrEqualTo(110)); // 1900 + 110 + } + + @Test public void strutsIsAnalyzed() { assertThat(sonar.find(new ResourceQuery(PROJECT_STRUTS)).getName(), is("Struts")); assertThat(sonar.find(new ResourceQuery(PROJECT_STRUTS)).getVersion(), is("1.3.9")); |