@@ -9,6 +9,12 @@ public class RepositoryInformation
9
9
{
10
10
private readonly Repository repo ;
11
11
12
+ /// <summary>
13
+ /// Needed for mocking purposes.
14
+ /// </summary>
15
+ protected RepositoryInformation ( )
16
+ { }
17
+
12
18
internal RepositoryInformation ( Repository repo , bool isBare )
13
19
{
14
20
this . repo = repo ;
@@ -24,44 +30,44 @@ internal RepositoryInformation(Repository repo, bool isBare)
24
30
/// <summary>
25
31
/// Gets the normalized path to the git repository.
26
32
/// </summary>
27
- public string Path { get ; private set ; }
33
+ public virtual string Path { get ; private set ; }
28
34
29
35
/// <summary>
30
36
/// Gets the normalized path to the working directory.
31
37
/// <para>
32
38
/// Is the repository is bare, null is returned.
33
39
/// </para>
34
40
/// </summary>
35
- public string WorkingDirectory { get ; private set ; }
41
+ public virtual string WorkingDirectory { get ; private set ; }
36
42
37
43
/// <summary>
38
44
/// Indicates whether the repository has a working directory.
39
45
/// </summary>
40
- public bool IsBare { get ; private set ; }
46
+ public virtual bool IsBare { get ; private set ; }
41
47
42
48
/// <summary>
43
49
/// Gets a value indicating whether this repository is empty.
44
50
/// </summary>
45
51
/// <value>
46
52
/// <c>true</c> if this repository is empty; otherwise, <c>false</c>.
47
53
/// </value>
48
- public bool IsEmpty
54
+ public virtual bool IsEmpty
49
55
{
50
56
get { return NativeMethods . RepositoryStateChecker ( repo . Handle , NativeMethods . git_repository_is_empty ) ; }
51
57
}
52
58
53
59
/// <summary>
54
60
/// Indicates whether the Head points to an arbitrary commit instead of the tip of a local branch.
55
61
/// </summary>
56
- public bool IsHeadDetached
62
+ public virtual bool IsHeadDetached
57
63
{
58
64
get { return NativeMethods . RepositoryStateChecker ( repo . Handle , NativeMethods . git_repository_head_detached ) ; }
59
65
}
60
66
61
67
/// <summary>
62
68
/// Indicates whether the Head points to a reference which doesn't exist.
63
69
/// </summary>
64
- public bool IsHeadOrphaned
70
+ public virtual bool IsHeadOrphaned
65
71
{
66
72
get { return NativeMethods . RepositoryStateChecker ( repo . Handle , NativeMethods . git_repository_head_orphan ) ; }
67
73
}
0 commit comments