Skip to content

Instantly share code, notes, and snippets.

@follesoe
Created May 5, 2010 22:05
Show Gist options
  • Save follesoe/391511 to your computer and use it in GitHub Desktop.
Save follesoe/391511 to your computer and use it in GitHub Desktop.
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