diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-01-26 21:52:24 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-01-26 23:16:14 +0400 |
commit | a0c122748fbacf4a3a57b52206c2f1692380dc69 (patch) | |
tree | bd3c6b8b25d72ee45a2e8cf803a4b5aa9aac51ab /sonar-duplications/src/test/java/org/sonar/duplications/block | |
parent | 14091c078d2ca1793e5186ef4dd7b55002d1b1cd (diff) | |
download | sonarqube-a0c122748fbacf4a3a57b52206c2f1692380dc69.tar.gz sonarqube-a0c122748fbacf4a3a57b52206c2f1692380dc69.zip |
SONAR-3139 Remove deprecated code, add some comments and tests
Diffstat (limited to 'sonar-duplications/src/test/java/org/sonar/duplications/block')
-rw-r--r-- | sonar-duplications/src/test/java/org/sonar/duplications/block/BlockChunkerTestCase.java | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/block/BlockChunkerTestCase.java b/sonar-duplications/src/test/java/org/sonar/duplications/block/BlockChunkerTestCase.java index 62c2a43cecb..ae30eab8d6e 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/block/BlockChunkerTestCase.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/block/BlockChunkerTestCase.java @@ -19,19 +19,15 @@ */ package org.sonar.duplications.block; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.sameInstance; -import static org.junit.Assert.assertThat; +import com.google.common.collect.Lists; +import org.junit.Test; +import org.sonar.duplications.statement.Statement; import java.util.Collections; import java.util.List; -import org.junit.Test; -import org.sonar.duplications.statement.Statement; - -import com.google.common.collect.Lists; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.assertThat; /** * Any implementation of {@link BlockChunker} should pass these test scenarios. @@ -91,11 +87,11 @@ public abstract class BlockChunkerTestCase { List<Block> blocks = chunker.chunk("resource", statements); assertThat(blocks.size(), is(4)); assertThat(blocks.get(0).getIndexInFile(), is(0)); - assertThat(blocks.get(0).getFirstLineNumber(), is(0)); - assertThat(blocks.get(0).getLastLineNumber(), is(2)); + assertThat(blocks.get(0).getStartLine(), is(0)); + assertThat(blocks.get(0).getEndLine(), is(2)); assertThat(blocks.get(1).getIndexInFile(), is(1)); - assertThat(blocks.get(1).getFirstLineNumber(), is(1)); - assertThat(blocks.get(1).getLastLineNumber(), is(3)); + assertThat(blocks.get(1).getStartLine(), is(1)); + assertThat(blocks.get(1).getEndLine(), is(3)); } @Test |