Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit db99dc4

Browse files
committed
Add tests skeletons
1 parent 5089193 commit db99dc4

File tree

128 files changed

+7303
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+7303
-18
lines changed

src/LibGit2.Tests/LibGit2.Tests.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616
<ProjectReference Include="..\LibGit2\LibGit2.csproj" />
1717
</ItemGroup>
1818

19+
<ItemGroup>
20+
<Folder Include="generated" />
21+
</ItemGroup>
22+
1923
</Project>

src/LibGit2.Tests/LibGit2TestsBase.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using System.IO;
3+
using NUnit.Framework;
4+
5+
namespace LibGit2.Tests
6+
{
7+
using static libgit2;
8+
9+
[TestFixture]
10+
public abstract class LibGit2TestsBase
11+
{
12+
public static readonly string RootPathOfThisRepository = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, "..", "..", "..", "..", ".."));
13+
14+
[OneTimeSetUp]
15+
public void Init()
16+
{
17+
git_libgit2_init();
18+
19+
var checkFolder = Path.Combine(RootPathOfThisRepository, "src", "LibGit2");
20+
if (!Directory.Exists(checkFolder))
21+
{
22+
Assert.Fail($"The root folder `{RootPathOfThisRepository}` is invalid. Are you really running the tests from the binary folder?");
23+
}
24+
}
25+
26+
[OneTimeTearDown]
27+
public void Shutdown()
28+
{
29+
git_libgit2_shutdown();
30+
}
31+
}
32+
}

src/LibGit2.Tests/UnitTest1.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/LibGit2.Tests/annotated_commit.cs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System;
2+
3+
using System.IO;
4+
5+
using NUnit.Framework;
6+
7+
namespace LibGit2.Tests
8+
{
9+
using static libgit2;
10+
11+
public partial class AnnotatedCommitTests
12+
{
13+
[Test]
14+
public void Test_git_annotated_commit_from_ref()
15+
{
16+
Assert.Fail($"Tests for method `{nameof(git_annotated_commit_from_ref)}` are not yet implemented");
17+
}
18+
19+
[Test]
20+
public void Test_git_annotated_commit_from_fetchhead()
21+
{
22+
Assert.Fail($"Tests for method `{nameof(git_annotated_commit_from_fetchhead)}` are not yet implemented");
23+
}
24+
25+
[Test]
26+
public void Test_git_annotated_commit_lookup()
27+
{
28+
Assert.Fail($"Tests for method `{nameof(git_annotated_commit_lookup)}` are not yet implemented");
29+
}
30+
31+
[Test]
32+
public void Test_git_annotated_commit_from_revspec()
33+
{
34+
Assert.Fail($"Tests for method `{nameof(git_annotated_commit_from_revspec)}` are not yet implemented");
35+
}
36+
37+
[Test]
38+
public void Test_git_annotated_commit_id()
39+
{
40+
Assert.Fail($"Tests for method `{nameof(git_annotated_commit_id)}` are not yet implemented");
41+
}
42+
43+
[Test]
44+
public void Test_git_annotated_commit_ref()
45+
{
46+
Assert.Fail($"Tests for method `{nameof(git_annotated_commit_ref)}` are not yet implemented");
47+
}
48+
49+
[Test]
50+
public void Test_git_annotated_commit_free()
51+
{
52+
Assert.Fail($"Tests for method `{nameof(git_annotated_commit_free)}` are not yet implemented");
53+
}
54+
}
55+
}

src/LibGit2.Tests/apply.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System;
2+
3+
using System.IO;
4+
5+
using NUnit.Framework;
6+
7+
namespace LibGit2.Tests
8+
{
9+
using static libgit2;
10+
11+
public partial class ApplyTests
12+
{
13+
[Test]
14+
public void Test_git_apply_to_tree()
15+
{
16+
Assert.Fail($"Tests for method `{nameof(git_apply_to_tree)}` are not yet implemented");
17+
}
18+
19+
[Test]
20+
public void Test_git_apply()
21+
{
22+
Assert.Fail($"Tests for method `{nameof(git_apply)}` are not yet implemented");
23+
}
24+
}
25+
}

src/LibGit2.Tests/attr.cs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using System;
2+
3+
using System.IO;
4+
5+
using NUnit.Framework;
6+
7+
namespace LibGit2.Tests
8+
{
9+
using static libgit2;
10+
11+
public partial class AttrTests
12+
{
13+
[Test]
14+
public void Test_git_attr_value()
15+
{
16+
Assert.Fail($"Tests for method `{nameof(git_attr_value)}` are not yet implemented");
17+
}
18+
19+
[Test]
20+
public void Test_git_attr_get()
21+
{
22+
Assert.Fail($"Tests for method `{nameof(git_attr_get)}` are not yet implemented");
23+
}
24+
25+
[Test]
26+
public void Test_git_attr_get_many()
27+
{
28+
Assert.Fail($"Tests for method `{nameof(git_attr_get_many)}` are not yet implemented");
29+
}
30+
31+
[Test]
32+
public void Test_git_attr_foreach()
33+
{
34+
Assert.Fail($"Tests for method `{nameof(git_attr_foreach)}` are not yet implemented");
35+
}
36+
37+
[Test]
38+
public void Test_git_attr_cache_flush()
39+
{
40+
Assert.Fail($"Tests for method `{nameof(git_attr_cache_flush)}` are not yet implemented");
41+
}
42+
43+
[Test]
44+
public void Test_git_attr_add_macro()
45+
{
46+
Assert.Fail($"Tests for method `{nameof(git_attr_add_macro)}` are not yet implemented");
47+
}
48+
}
49+
}

src/LibGit2.Tests/blame.cs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
using System;
2+
3+
using System.IO;
4+
5+
using NUnit.Framework;
6+
7+
namespace LibGit2.Tests
8+
{
9+
using static libgit2;
10+
11+
public partial class BlameTests
12+
{
13+
[Test]
14+
public void Test_git_blame_init_options()
15+
{
16+
Assert.Fail($"Tests for method `{nameof(git_blame_init_options)}` are not yet implemented");
17+
}
18+
19+
[Test]
20+
public void Test_git_blame_get_hunk_count()
21+
{
22+
Assert.Fail($"Tests for method `{nameof(git_blame_get_hunk_count)}` are not yet implemented");
23+
}
24+
25+
[Test]
26+
public void Test_git_blame_get_hunk_byindex()
27+
{
28+
Assert.Fail($"Tests for method `{nameof(git_blame_get_hunk_byindex)}` are not yet implemented");
29+
}
30+
31+
[Test]
32+
public void Test_git_blame_get_hunk_byline()
33+
{
34+
Assert.Fail($"Tests for method `{nameof(git_blame_get_hunk_byline)}` are not yet implemented");
35+
}
36+
37+
[Test]
38+
public void Test_git_blame_file()
39+
{
40+
Assert.Fail($"Tests for method `{nameof(git_blame_file)}` are not yet implemented");
41+
}
42+
43+
[Test]
44+
public void Test_git_blame_buffer()
45+
{
46+
Assert.Fail($"Tests for method `{nameof(git_blame_buffer)}` are not yet implemented");
47+
}
48+
49+
[Test]
50+
public void Test_git_blame_free()
51+
{
52+
Assert.Fail($"Tests for method `{nameof(git_blame_free)}` are not yet implemented");
53+
}
54+
}
55+
}

src/LibGit2.Tests/blob.cs

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
using System;
2+
3+
using System.IO;
4+
5+
using NUnit.Framework;
6+
7+
namespace LibGit2.Tests
8+
{
9+
using static libgit2;
10+
11+
public partial class BlobTests
12+
{
13+
[Test]
14+
public void Test_git_blob_lookup()
15+
{
16+
Assert.Fail($"Tests for method `{nameof(git_blob_lookup)}` are not yet implemented");
17+
}
18+
19+
[Test]
20+
public void Test_git_blob_lookup_prefix()
21+
{
22+
Assert.Fail($"Tests for method `{nameof(git_blob_lookup_prefix)}` are not yet implemented");
23+
}
24+
25+
[Test]
26+
public void Test_git_blob_free()
27+
{
28+
Assert.Fail($"Tests for method `{nameof(git_blob_free)}` are not yet implemented");
29+
}
30+
31+
[Test]
32+
public void Test_git_blob_id()
33+
{
34+
Assert.Fail($"Tests for method `{nameof(git_blob_id)}` are not yet implemented");
35+
}
36+
37+
[Test]
38+
public void Test_git_blob_owner()
39+
{
40+
Assert.Fail($"Tests for method `{nameof(git_blob_owner)}` are not yet implemented");
41+
}
42+
43+
[Test]
44+
public void Test_git_blob_rawcontent()
45+
{
46+
Assert.Fail($"Tests for method `{nameof(git_blob_rawcontent)}` are not yet implemented");
47+
}
48+
49+
[Test]
50+
public void Test_git_blob_rawsize()
51+
{
52+
Assert.Fail($"Tests for method `{nameof(git_blob_rawsize)}` are not yet implemented");
53+
}
54+
55+
[Test]
56+
public void Test_git_blob_filtered_content()
57+
{
58+
Assert.Fail($"Tests for method `{nameof(git_blob_filtered_content)}` are not yet implemented");
59+
}
60+
61+
[Test]
62+
public void Test_git_blob_create_fromworkdir()
63+
{
64+
Assert.Fail($"Tests for method `{nameof(git_blob_create_fromworkdir)}` are not yet implemented");
65+
}
66+
67+
[Test]
68+
public void Test_git_blob_create_fromdisk()
69+
{
70+
Assert.Fail($"Tests for method `{nameof(git_blob_create_fromdisk)}` are not yet implemented");
71+
}
72+
73+
[Test]
74+
public void Test_git_blob_create_fromstream()
75+
{
76+
Assert.Fail($"Tests for method `{nameof(git_blob_create_fromstream)}` are not yet implemented");
77+
}
78+
79+
[Test]
80+
public void Test_git_blob_create_fromstream_commit()
81+
{
82+
Assert.Fail($"Tests for method `{nameof(git_blob_create_fromstream_commit)}` are not yet implemented");
83+
}
84+
85+
[Test]
86+
public void Test_git_blob_create_frombuffer()
87+
{
88+
Assert.Fail($"Tests for method `{nameof(git_blob_create_frombuffer)}` are not yet implemented");
89+
}
90+
91+
[Test]
92+
public void Test_git_blob_is_binary()
93+
{
94+
Assert.Fail($"Tests for method `{nameof(git_blob_is_binary)}` are not yet implemented");
95+
}
96+
97+
[Test]
98+
public void Test_git_blob_dup()
99+
{
100+
Assert.Fail($"Tests for method `{nameof(git_blob_dup)}` are not yet implemented");
101+
}
102+
}
103+
}

0 commit comments

Comments
 (0)