diff --git a/docs/core/testing/mstest-analyzers/mstest0012.md b/docs/core/testing/mstest-analyzers/mstest0012.md index 941a329f7b900..8bf142da01e9f 100644 --- a/docs/core/testing/mstest-analyzers/mstest0012.md +++ b/docs/core/testing/mstest-analyzers/mstest0012.md @@ -32,12 +32,12 @@ A method marked with `[AssemblyInitialize]` should have valid layout. Methods marked with `[AssemblyInitialize]` should follow the following layout to be valid: -- it can't be declared on a generic class - it should be `public` - it should be `static` - it should not be `async void` - it should not be a special method (finalizer, operator...). - it should not be generic +- it should not be abstract - it should take one parameter of type `TestContext` - return type should be `void`, `Task` or `ValueTask` @@ -45,7 +45,6 @@ The type declaring these methods should also respect the following rules: - The type should be a class. - The class should be public or internal (if the test project is using the [DiscoverInternals] attribute). -- The class shouldn't be static. - The class should be marked with [TestClass] (or a derived attribute) - the class should not be generic diff --git a/docs/core/testing/mstest-analyzers/mstest0013.md b/docs/core/testing/mstest-analyzers/mstest0013.md index 45fb4dec5698c..65f8242c6b589 100644 --- a/docs/core/testing/mstest-analyzers/mstest0013.md +++ b/docs/core/testing/mstest-analyzers/mstest0013.md @@ -32,12 +32,12 @@ A method marked with `[AssemblyCleanup]` should have valid layout. Methods marked with `[AssemblyCleanup]` should follow the following layout to be valid: -- it can't be declared on a generic class - it should be `public` - it should be `static` - it should not be `async void` - it should not be a special method (finalizer, operator...). - it should not be generic +- it should not be abstract - it should not take any parameter, or starting with MSTest 3.8, it can have a single `TestContext` parameter - return type should be `void`, `Task` or `ValueTask` @@ -45,7 +45,6 @@ The type declaring these methods should also respect the following rules: - The type should be a class. - The class should be public or internal (if the test project is using the [DiscoverInternals] attribute). -- The class shouldn't be static. - The class should be marked with [TestClass] (or a derived attribute) - the class should not be generic