Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryorah <yoram.harmelin@gmail.com>2012-06-19 14:35:44 +0400
committeryorah <yoram.harmelin@gmail.com>2012-06-19 14:35:44 +0400
commitcda8d3feeabe804af3ba685c27b8ab4ccf4794a1 (patch)
tree2b9a1eece12967883d673f7d4ef6ab00a0d8bd05 /LibGit2Sharp/TreeEntry.cs
parent1061def8c152ee52a846c973e9fb035bd80c7941 (diff)
Make all public types mockable
Diffstat (limited to 'LibGit2Sharp/TreeEntry.cs')
-rw-r--r--LibGit2Sharp/TreeEntry.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/LibGit2Sharp/TreeEntry.cs b/LibGit2Sharp/TreeEntry.cs
index 6e3ca656..e0458910 100644
--- a/LibGit2Sharp/TreeEntry.cs
+++ b/LibGit2Sharp/TreeEntry.cs
@@ -19,6 +19,12 @@ namespace LibGit2Sharp
private static readonly LambdaEqualityHelper<TreeEntry> equalityHelper =
new LambdaEqualityHelper<TreeEntry>(new Func<TreeEntry, object>[] { x => x.Name, x => x.parentTreeId });
+ /// <summary>
+ /// Needed for mocking purposes.
+ /// </summary>
+ protected TreeEntry()
+ { }
+
internal TreeEntry(TreeEntrySafeHandle obj, ObjectId parentTreeId, Repository repo, FilePath parentPath)
{
this.parentTreeId = parentTreeId;
@@ -35,23 +41,23 @@ namespace LibGit2Sharp
/// <summary>
/// Gets the file mode.
/// </summary>
- public Mode Mode { get; private set; }
+ public virtual Mode Mode { get; private set; }
/// <summary>
/// Gets the filename.
/// </summary>
- public string Name { get; private set; }
+ public virtual string Name { get; private set; }
/// <summary>
/// Gets the path.
/// <para>The path is expressed in a relative form from the latest known <see cref="Tree"/>. Path segments are separated with a forward or backslash, depending on the OS the libray is being run on."/></para>
/// </summary>
- public string Path { get { return path.Value; } }
+ public virtual string Path { get { return path.Value; } }
/// <summary>
/// Gets the <see cref = "GitObject" /> being pointed at.
/// </summary>
- public GitObject Target
+ public virtual GitObject Target
{
get { return target.Value; }
}
@@ -64,7 +70,7 @@ namespace LibGit2Sharp
/// <summary>
/// Gets the <see cref = "GitObjectType" /> of the <see cref = "Target" /> being pointed at.
/// </summary>
- public GitObjectType Type { get; private set; }
+ public virtual GitObjectType Type { get; private set; }
private GitObject RetrieveTreeEntryTarget()
{