mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
split hg tag command tests
This commit is contained in:
@@ -55,18 +55,21 @@ public class HgTagCommandTest extends AbstractHgCommandTestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldCreateAndDeleteTagCorrectly() {
|
public void shouldCreateTagCorrectly() {
|
||||||
// Create
|
// Create
|
||||||
new HgTagCommand(cmdContext, workingCopyFactory).create(new TagCreateRequest("79b6baf49711", "newtag"));
|
new HgTagCommand(cmdContext, workingCopyFactory).create(new TagCreateRequest("79b6baf49711", "tagtag"));
|
||||||
List<Tag> tags = new HgTagsCommand(cmdContext).getTags();
|
List<Tag> tags = new HgTagsCommand(cmdContext).getTags();
|
||||||
assertThat(tags).hasSize(2);
|
assertThat(tags).hasSize(4);
|
||||||
final Tag newTag = tags.get(1);
|
final Tag newTag = tags.get(1);
|
||||||
assertThat(newTag.getName()).isEqualTo("newtag");
|
assertThat(newTag.getName()).isEqualTo("tagtag");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void shouldDeleteTagCorrectly() {
|
||||||
// Delete
|
// Delete
|
||||||
new HgTagCommand(cmdContext, workingCopyFactory).delete(new TagDeleteRequest("newtag"));
|
new HgTagCommand(cmdContext, workingCopyFactory).delete(new TagDeleteRequest("newtag"));
|
||||||
tags = new HgTagsCommand(cmdContext).getTags();
|
List<Tag> tags = new HgTagsCommand(cmdContext).getTags();
|
||||||
assertThat(tags).hasSize(1);
|
assertThat(tags).hasSize(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user