-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
How to reproduce
Create a test class with documentation like:
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MyTest
{
/// <summary>
/// Tests the <see cref="MyClass"/> class.
/// </summary>
[TestClass]
public class MyClassTest
{
/// <summary>
/// Tests the <see cref="MyClass.MyClass"/> constructor.
/// </summary>
public void Constructor()
{
}
}
}
Use the auto-fix feature for MT1003, result is:
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MyTest
{
/// <summary>
/// Tests the <see cref="MyClass"/> class.
/// </summary>
[TestClass]
public class MyClassTest
{
[TestMethod]
/// <summary>
/// Tests the <see cref="MyClass.MyClass"/> constructor.
/// </summary>
public void Constructor()
{
}
}
}
Expected result
- The using reference should not be doubled
- The [TestMethod] should be between the comment and the method signature
- The method comment should remain untouched
The result of the auto-fix should be:
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MyTest
{
/// <summary>
/// Tests the <see cref="MyClass"/> class.
/// </summary>
[TestClass]
public class MyClassTest
{
/// <summary>
/// Tests the <see cref="MyClass.MyClass"/> constructor.
/// </summary>
[TestMethod]
public void Constructor()
{
}
}
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers