Search in sources :

Example 6 with SourceHashComputer

use of org.sonar.core.hash.SourceHashComputer in project sonarqube by SonarSource.

the class ScmInfoDbLoaderTest method computeSourceHash.

private static String computeSourceHash(int lineCount) {
    SourceHashComputer sourceHashComputer = new SourceHashComputer();
    Iterator<String> lines = generateLines(lineCount).iterator();
    while (lines.hasNext()) {
        sourceHashComputer.addLine(lines.next(), lines.hasNext());
    }
    return sourceHashComputer.getHash();
}
Also used : SourceHashComputer(org.sonar.core.hash.SourceHashComputer)

Aggregations

SourceHashComputer (org.sonar.core.hash.SourceHashComputer)6 Test (org.junit.Test)2