diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-02-08 10:15:56 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-02-08 10:15:56 +0100 |
commit | 85e7e49bcfa5fb64fd499060c279cd679c799e39 (patch) | |
tree | 613184fccfd86801471d0907633be90712717145 /sonar-batch/src/test | |
parent | 6a86b71f63edfb4b9a07246a40fd5c6dccf098a7 (diff) | |
download | sonarqube-85e7e49bcfa5fb64fd499060c279cd679c799e39.tar.gz sonarqube-85e7e49bcfa5fb64fd499060c279cd679c799e39.zip |
SONAR-2747 Verification is now done on period1
And not necessarily 'since last analysis' period.
Diffstat (limited to 'sonar-batch/src/test')
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java b/sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java index 7d4be9f7802..68468e09e7e 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/components/TimeMachineConfigurationTest.java @@ -21,7 +21,6 @@ package org.sonar.batch.components; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.nullValue; import static org.mockito.Matchers.argThat; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; @@ -85,23 +84,4 @@ public class TimeMachineConfigurationTest extends AbstractDbUnitTestCase { verifyZeroInteractions(pastSnapshotFinder); } - @Test - public void shouldReturnLastAnalysisIndexIfSet() { - PropertiesConfiguration conf = new PropertiesConfiguration(); - TimeMachineConfiguration timeMachineConfiguration = new TimeMachineConfiguration(getSession(), new Project("my:project"), conf, - mock(PastSnapshotFinder.class)); - - // Nothing set, so period for 'previous_analysis' is 1 by default - assertThat(timeMachineConfiguration.getLastAnalysisPeriodIndex(), is(1)); - - // period1 has been replaced and 'previous_analysis' not set elsewhere... - conf.setProperty(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 1, "Version 1"); - conf.setProperty(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 2, "Version 2"); - assertThat(timeMachineConfiguration.getLastAnalysisPeriodIndex(), is(nullValue())); - - // 'previous_analysis' has now been set on period 4 - conf.setProperty(CoreProperties.TIMEMACHINE_PERIOD_PREFIX + 4, CoreProperties.TIMEMACHINE_MODE_PREVIOUS_ANALYSIS); - assertThat(timeMachineConfiguration.getLastAnalysisPeriodIndex(), is(4)); - } - } |