Skip to content

Instantly share code, notes, and snippets.

@jfromaniello
Created May 6, 2010 11:51
Show Gist options
  • Save jfromaniello/392046 to your computer and use it in GitHub Desktop.
Save jfromaniello/392046 to your computer and use it in GitHub Desktop.
public class Foo
{
private readonly StreamWriter streamWriter;
private readonly string fileName;
private readonly string directory;
/// <summary>
/// my heavy constructor
/// </summary>
/// <param name="streamWriter"></param>
/// <param name="fileName"></param>
/// <param name="directory"></param>
public Foo(StreamWriter streamWriter, string fileName, string directory )
{
this.streamWriter = streamWriter;
this.fileName = fileName;
this.directory = directory;
}
public virtual string DoSomething()
{
return "abcd";
}
}
[TestFixture]
public class TestFixture
{
[Test]
public void test()
{
var epa = (Foo)FormatterServices.GetUninitializedObject(typeof (Foo));
Assert.AreEqual("abcd", epa.DoSomething());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment