Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vladak committed Sep 11, 2024
1 parent 5c241e6 commit 6dcc050
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,9 @@ void testAnnotationPositive(Pair<String, List<String>> pair) throws Exception {
assertEquals(pair.getValue(), revisions);
}

/**
* Test special case of repository with no tags, in this case empty repository.
*/
@Test
void testBuildTagListEmpty() throws Exception {
Path repositoryRootPath = Files.createDirectory(Path.of(RuntimeEnvironment.getInstance().getSourceRootPath(),
Expand All @@ -463,6 +466,9 @@ void testBuildTagListEmpty() throws Exception {
IOUtils.removeRecursive(repositoryRootPath);
}

/**
* Extract the tags from the original repository. It already contains one tag.
*/
@Test
void testBuildTagListInitial() throws Exception {
MercurialRepository hgRepo = (MercurialRepository) RepositoryFactory.getRepository(repositoryRoot);
Expand All @@ -476,6 +482,10 @@ void testBuildTagListInitial() throws Exception {
assertEquals(expectedTags, tags);
}

/**
* Clone the original repository, add new tag, check that the extracted tags contain the pre-existing
* and new one.
*/
@Test
void testBuildTagListOneMore() throws Exception {
Path repositoryRootPath = Files.createDirectory(Path.of(RuntimeEnvironment.getInstance().getSourceRootPath(),
Expand Down

0 comments on commit 6dcc050

Please sign in to comment.