Share via


WebTestRequest.ExpectedHttpStatusCode Özellik

Alır veya ayarlar bu istek için beklenen http durum kodu.

Ad alanı:  Microsoft.VisualStudio.TestTools.WebTesting
Derleme:  Microsoft.VisualStudio.QualityTools.WebTestFramework (Microsoft.VisualStudio.QualityTools.WebTestFramework.dll içinde)

Sözdizimi

'Bildirim
Public Property ExpectedHttpStatusCode As Integer
public int ExpectedHttpStatusCode { get; set; }
public:
property int ExpectedHttpStatusCode {
    int get ();
    void set (int value);
}
member ExpectedHttpStatusCode : int with get, set
function get ExpectedHttpStatusCode () : int
function set ExpectedHttpStatusCode (value : int)

Özellik Değeri

Tür: System.Int32
http durum kodu.

Notlar

Hata durumu "404 Not Found" durumu gibi bir istek için beklediğiniz bir istek başarısızlığı engellemek için kod, bu özelliği kullanın.

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

WebTestRequest Sınıf

Microsoft.VisualStudio.TestTools.WebTesting Ad Alanı