File tree 2 files changed +2
-4
lines changed
docs/core/testing/mstest-analyzers
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -32,20 +32,19 @@ A method marked with `[AssemblyInitialize]` should have valid layout.
32
32
33
33
Methods marked with ` [AssemblyInitialize] ` should follow the following layout to be valid:
34
34
35
- - it can't be declared on a generic class
36
35
- it should be ` public `
37
36
- it should be ` static `
38
37
- it should not be ` async void `
39
38
- it should not be a special method (finalizer, operator...).
40
39
- it should not be generic
40
+ - it should not be abstract
41
41
- it should take one parameter of type ` TestContext `
42
42
- return type should be ` void ` , ` Task ` or ` ValueTask `
43
43
44
44
The type declaring these methods should also respect the following rules:
45
45
46
46
- The type should be a class.
47
47
- The class should be public or internal (if the test project is using the [ DiscoverInternals] attribute).
48
- - The class shouldn't be static.
49
48
- The class should be marked with [ TestClass] (or a derived attribute)
50
49
- the class should not be generic
51
50
Original file line number Diff line number Diff line change @@ -32,20 +32,19 @@ A method marked with `[AssemblyCleanup]` should have valid layout.
32
32
33
33
Methods marked with ` [AssemblyCleanup] ` should follow the following layout to be valid:
34
34
35
- - it can't be declared on a generic class
36
35
- it should be ` public `
37
36
- it should be ` static `
38
37
- it should not be ` async void `
39
38
- it should not be a special method (finalizer, operator...).
40
39
- it should not be generic
40
+ - it should not be abstract
41
41
- it should not take any parameter, or starting with MSTest 3.8, it can have a single ` TestContext ` parameter
42
42
- return type should be ` void ` , ` Task ` or ` ValueTask `
43
43
44
44
The type declaring these methods should also respect the following rules:
45
45
46
46
- The type should be a class.
47
47
- The class should be public or internal (if the test project is using the [ DiscoverInternals] attribute).
48
- - The class shouldn't be static.
49
48
- The class should be marked with [ TestClass] (or a derived attribute)
50
49
- the class should not be generic
51
50
You can’t perform that action at this time.
0 commit comments