Visual Studio에서 새 단위 테스트를 만들 때 (기본 포함 된 단위 테스트 프레임 워크 사용) 불필요하게 자세한 템플릿이 짜증을냅니다. 대신VS Unit Testing Framework의 단위 테스트 템플릿은 어디에 있습니까?
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;
}
}
의 난 내가 하나를 추가 할 것입니다 생성자를 필요로하고, 같은 특수 getter 및 setter 간다 경우 단순히
/// <summary>
///Gets or sets the test context which provides
///information about and functionality for the current test run.
///</summary>
public TestContext TestContext { get; set; }
을 가지고 싶습니다. 또한 포함 된 샘플 TestMethod를 제거하고 싶습니다. 이름을 바꾸어야하므로 처음부터 직접 작성할 수도 있습니다.
이 테스트 파일을 만드는 데 사용 된 템플릿을 찾았지만 찾지 못했습니다 (주로 컨트롤러와 뷰에 사용되는 T4 템플릿의 주변에서 보았습니다). 이 템플릿은 어디에서 바꿀 수 있습니까?
나는 당신이 무슨 뜻인지 안다. 나는 이것을 얼마 전에 시도해 보았고 테스트 코드가 동적으로 생성된다는 것을 발견했다. 내 궁극적 인 해결책은 nUnit으로 이동하는 것이 었습니다. – Robert