Created
May 6, 2010 11:51
-
-
Save jfromaniello/392046 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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