Skip to content

Instantly share code, notes, and snippets.

@hagbarddenstore
Created July 29, 2013 14:34
Show Gist options
  • Save hagbarddenstore/6104733 to your computer and use it in GitHub Desktop.
Save hagbarddenstore/6104733 to your computer and use it in GitHub Desktop.
How to enable injection of test values.
class Test
{
private string _logFilePath;
public string LogFilePath
{
get
{
if (string.IsNullOrEmpty(_logFilePath))
{
_logFilePath = ConfigurationManager.AppSettings["LogFilePath"];
}
return _logFilePath;
}
set
{
_logFilePath = value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment