The following code will compile successfully:
public class MyTestMethod : TestMethodAttribute
{
public MyTestMethod([CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1) : base(callerFilePath, callerLineNumber)
{
}
}
[TestClass]
public class MyTestClass
{
[TestMethod]
[MyTestMethod]
public void M() { }
}
We should produce a warning so that user picks one of the two attributes.