refactor!: use Oid instead of String for arguments

This commit is contained in:
Aleksey Kulikov 2021-10-13 15:31:20 +03:00
parent 23787adc3a
commit 1972c6d1ab
39 changed files with 264 additions and 290 deletions

View file

@ -7,13 +7,13 @@ void main() {
late Repository repo;
late Tag tag;
late Directory tmpDir;
late Oid tagID;
late Oid tagOid;
setUp(() {
tmpDir = setupRepo(Directory('test/assets/testrepo/'));
repo = Repository.open(tmpDir.path);
tagID = repo['f0fdbf506397e9f58c59b88dfdd72778ec06cc0c'];
tag = repo.lookupTag(tagID);
tagOid = repo['f0fdbf506397e9f58c59b88dfdd72778ec06cc0c'];
tag = repo.lookupTag(tagOid);
});
tearDown(() {
@ -37,7 +37,7 @@ void main() {
final target = tag.target as Commit;
final tagger = tag.tagger;
expect(tag.id, tagID);
expect(tag.oid, tagOid);
expect(tag.name, 'v0.2');
expect(tag.message, 'annotated tag\n');
expect(target.message, 'add subdirectory file\n');
@ -69,11 +69,11 @@ void main() {
final tagger = newTag.tagger;
final newTagTarget = newTag.target as Commit;
expect(newTag.id.sha, '131a5eb6b7a880b5096c550ee7351aeae7b95a42');
expect(newTag.oid.sha, '131a5eb6b7a880b5096c550ee7351aeae7b95a42');
expect(newTag.name, tagName);
expect(newTag.message, message);
expect(tagger, signature);
expect(newTagTarget.id, target);
expect(newTagTarget.oid, target);
newTag.free();
newTagTarget.free();