Created
May 5, 2010 22:05
-
-
Save follesoe/391511 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
namespace BlackBox.CodeGeneration | |
{ | |
public class TestFlavour | |
{ | |
public string Namespace { get; private set;} | |
public string TestAttribute { get; private set; } | |
public string ClassAttribute { get; private set; } | |
public string SetupAttribute { get; private set; } | |
public bool ConstructorAsSetup() | |
{ | |
return string.IsNullOrEmpty(SetupAttribute); | |
} | |
private TestFlavour() | |
{ | |
} | |
public static TestFlavour CreateXunit() | |
{ | |
return new TestFlavour | |
{ | |
Namespace = "Xunit", | |
TestAttribute = "Fact" | |
}; | |
} | |
public static TestFlavour CreateMSTest() | |
{ | |
return new TestFlavour | |
{ | |
Namespace = "Microsoft.VisualStudio.TestTools.UnitTesting", | |
ClassAttribute = "TestClass", | |
TestAttribute = "TestMethod", | |
SetupAttribute = "TestInitialize" | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment