assertEquals(1, repository.getReviewCount());
repository.commit(); // release the database connection
}
public void testOneTooLongAgo() {
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(1000 * 60 * 6), content + "a\nb", author1);
repository.commit();
assertEquals(0, MicroEditCastigator.countMicroEdits(repository, artifact, 3, 300 * 1000, new Date(1000 * 60 * 6).getTime(), 600 * 1000));
assertEquals(0, repository.getReviewCount());
artifact = repository.addArtifact(new ArtifactIdentifier("ArtifactIdentifier(x,3,t)"), new Date(1000 * 60 * 11), content + "a\nb\nc", author1);
repository.commit();
assertEquals(0, MicroEditCastigator.countMicroEdits(repository, artifact, 3, 300 * 1000, new Date(1000 * 60 * 11).getTime(), 600 * 1000));
assertEquals(0, repository.getReviewCount());
artifact = repository.addArtifact(new ArtifactIdentifier("ArtifactIdentifier(x,4,t)"), new Date(1000 * 60 * 14), content + "a\nb\nc\nd", author1);
repository.commit();
assertEquals(0, MicroEditCastigator.countMicroEdits(repository, artifact, 3, 300 * 1000, new Date(1000 * 60 * 14).getTime(), 600 * 1000));
assertEquals(0, repository.getReviewCount());
artifact = repository.addArtifact(new ArtifactIdentifier("ArtifactIdentifier(x,5,t)"), new Date(1000 * 60 * 17), content + "a\nb\ne", author1);
repository.commit();
assertEquals(1, MicroEditCastigator.countMicroEdits(repository, artifact, 3, 300 * 1000, new Date(1000 * 60 * 17).getTime(), 600 * 1000));
assertEquals(1, repository.getReviewCount());
repository.commit(); // release the database connection
}