mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
test: improve coverage
This commit is contained in:
parent
d75acbfdd3
commit
d6eae1e9ed
71 changed files with 710 additions and 229 deletions
|
@ -35,6 +35,19 @@ void main() {
|
|||
expect(oid, isA<Oid>());
|
||||
expect(oid.sha, sha);
|
||||
});
|
||||
|
||||
test('throws when sha hex string is too short', () {
|
||||
expect(
|
||||
() => Oid.fromSHA(repo: repo, sha: 'sha'),
|
||||
throwsA(
|
||||
isA<ArgumentError>().having(
|
||||
(e) => e.invalidValue,
|
||||
'value',
|
||||
'sha is not a valid sha hex string',
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
group('fromRaw()', () {
|
||||
|
@ -72,5 +85,9 @@ void main() {
|
|||
expect(oid1 >= oid2, true);
|
||||
});
|
||||
});
|
||||
|
||||
test('returns string representation of Oid object', () {
|
||||
expect(repo[sha].toString(), contains('Oid{'));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue