STATestMethodAttribute Classe
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Attributo della classe di test.
[System.AttributeUsage(System.AttributeTargets.Method)]
public class STATestMethodAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute
[System.AttributeUsage(System.AttributeTargets.Method)]
[System.Runtime.CompilerServices.Nullable(0)]
public class STATestMethodAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type STATestMethodAttribute = class
inherit TestMethodAttribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type STATestMethodAttribute = class
inherit TestMethodAttribute
Public Class STATestMethodAttribute
Inherits TestMethodAttribute
- Ereditarietà
- Attributi
Costruttori
| Nome | Descrizione |
|---|---|
| STATestMethodAttribute() |
Inizializza una nuova istanza della classe STATestMethodAttribute. |
| STATestMethodAttribute(String, Int32) |
Inizializza una nuova istanza della classe STATestMethodAttribute. |
| STATestMethodAttribute(String) |
Inizializza una nuova istanza della classe STATestMethodAttribute. |
| STATestMethodAttribute(TestMethodAttribute) |
Inizializza una nuova istanza della classe STATestMethodAttribute. Questo costruttore deve essere chiamato da STATestClassAttribute (o derivato) per eseguire il wrapping di un attributo del metodo di test esistente. Può anche essere chiamato da un derivato STATestMethodAttribute che verrà chiamato da un derivato STATestClassAttribute. |
Proprietà
| Nome | Descrizione |
|---|---|
| DeclaringFilePath |
Ottiene il percorso del file che dichiara l'attributo . (Ereditato da TestMethodAttribute) |
| DeclaringLineNumber |
Ottiene il numero di riga all'interno DeclaringFilePath di che dichiara l'attributo . (Ereditato da TestMethodAttribute) |
| DisplayName |
Ottiene o imposta il nome visualizzato per il test. (Ereditato da TestMethodAttribute) |
| UnfoldingStrategy |
Ottiene o imposta la strategia per lo svolgimento di test con parametri. (Ereditato da TestMethodAttribute) |
| UseSTASynchronizationContext |
Ottiene o imposta un valore che indica se l'attributo imposta un SynchronizationContext oggetto che mantiene lo stesso thread STA per le continuazioni asincrone.
Il valore predefinito è |
Metodi
| Nome | Descrizione |
|---|---|
| Execute(ITestMethod) |
Esegue un metodo di test. (Ereditato da TestMethodAttribute) |
| ExecuteAsync(ITestMethod) |
Esegue un metodo di test. |
| ExecuteCoreAsync(ITestMethod) |
Esecuzione principale del metodo di test STA, che si verifica nel thread STA. |