当我在 Visual Studio 中创建一个新的单元测试(使用默认的、包含的单元测试框架)时,我对使用的不必要的冗长模板越来越恼火。代替
public ImportModelStateTest()
{
//
// TODO: Add constructor logic here
//
}
private TestContext testContextInstance;
/// <summary>
///Gets or sets the test context which provides
///information about and functionality for the current test run.
///</summary>
public TestContext TestContext
{
get
{
return testContextInstance;
}
set
{
testContextInstance = value;
}
}
我想简单地
/// <summary>
///Gets or sets the test context which provides
///information about and functionality for the current test run.
///</summary>
public TestContext TestContext { get; set; }
如果我需要一个构造函数,我会添加一个,特殊的 getter 和 setter 也是如此。我还想删除包含的示例 TestMethod - 我仍然需要重命名它,所以我也可以从头开始编写自己的。
我一直在寻找用于创建这些测试文件的模板,但找不到它(我主要在用于控制器和视图的 T4 模板附近四处寻找)。我在哪里更改此模板?