Skip to content

Commit f5fe1ee

Browse files
half-ogrenulltoken
authored andcommitted
make Configuration#Get methods virtual
The commit libgit2@3d29d95 moved #Get overloads to extension methods. The problem is the remaining #Get methods aren't virtual, which means you can't stub in unit tests. Which broke a bunch of GHfW tests.
1 parent 91990fb commit f5fe1ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

LibGit2Sharp/Configuration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ protected virtual void Dispose(bool disposing)
180180
/// <typeparam name = "T">The configuration value type</typeparam>
181181
/// <param name = "key">The key</param>
182182
/// <returns>The <see cref="ConfigurationEntry{T}"/>, or null if not set</returns>
183-
public ConfigurationEntry<T> Get<T>(string key)
183+
public virtual ConfigurationEntry<T> Get<T>(string key)
184184
{
185185
Ensure.ArgumentNotNullOrEmptyString(key, "key");
186186

@@ -208,7 +208,7 @@ public ConfigurationEntry<T> Get<T>(string key)
208208
/// <param name = "key">The key</param>
209209
/// <param name = "level">The configuration file into which the key should be searched for</param>
210210
/// <returns>The <see cref="ConfigurationEntry{T}"/>, or null if not set</returns>
211-
public ConfigurationEntry<T> Get<T>(string key, ConfigurationLevel level)
211+
public virtual ConfigurationEntry<T> Get<T>(string key, ConfigurationLevel level)
212212
{
213213
Ensure.ArgumentNotNullOrEmptyString(key, "key");
214214

0 commit comments

Comments
 (0)