With and without parentheses its exactly the same:
[TestMethod] [TestMethod()]
Empty brackets simply call the default constructor of this attribute, which has no parameters. Thus, [TestMethod] . Both are called by default constructor.
That would be different:
[TestMethod(SomeParameter)]
And [Test] is an attribute that comes from the NUnit library and is different from the .Net attribute [TestMethod] .
Ronondex
source share