repository.commit(); // release the database connection
}
public void testInCombinationWithReputation() throws Exception {
new Configurator().configureReputationMetricManager((ConfigurationConfigurableCollabReview) collabReview, reputationConfigurationData);
Artifact artifact = repository.addArtifact(new ArtifactIdentifier("ArtifactIdentifier(x,1,t)"), new Date(0), content + "a", author1);
repository.commit();
assertEquals(0, MicroEditCastigator.countMicroEdits(repository, artifact, 3, 300 * 1000, new Date(0).getTime(), 600 * 1000));
assertEquals(0, repository.getReviewCount());
artifact = repository.addArtifact(new ArtifactIdentifier("ArtifactIdentifier(x,2,t)"), new Date(5), content + "a\nb", author1);
repository.commit();
assertEquals(0, MicroEditCastigator.countMicroEdits(repository, artifact, 3, 300 * 1000, new Date(5).getTime(), 600 * 1000));
assertEquals(0, repository.getReviewCount());
artifact = repository.addArtifact(new ArtifactIdentifier("ArtifactIdentifier(x,3,t)"), new Date(15), content + "a\nb\nc", author1);
repository.commit();
assertEquals(1, MicroEditCastigator.countMicroEdits(repository, artifact, 3, 300 * 1000, new Date(15).getTime(), 600 * 1000));
assertEquals(1, repository.getReviewCount());
artifact = repository.addArtifact(new ArtifactIdentifier("ArtifactIdentifier(x,4,t)"), new Date(25), content + "a\nb\nc\nd", author1);
repository.commit();
assertEquals(1, MicroEditCastigator.countMicroEdits(repository, artifact, 3, 300 * 1000, new Date(25).getTime(), 600 * 1000));
assertEquals(1, repository.getReviewCount());
repository.commit(); // release the database connection
}