File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
docs/core/testing/mstest-analyzers Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,12 @@ Methods marked with `[AssemblyInitialize]` should follow the following layout to
4040- it should take one parameter of type ` TestContext `
4141- return type should be ` void ` , ` Task ` or ` ValueTask `
4242
43- [ !INCLUDE [ test-class- rules] ( includes/test-class-rules.md )]
43+ The type declaring these methods should also respect the following rules:
4444
45+ - The type should be a class.
46+ - The class should be public or internal (if the test project is using the [ DiscoverInternals] attribute).
47+ - The class shouldn't be static.
48+ - The class should be marked with [ TestClass] (or a derived attribute)
4549- the class should not be generic
4650
4751## How to fix violations
You can’t perform that action at this time.
0 commit comments