Share via


ValidateResponseUrl.Validate Method

Validate is called with the test case context and transaction context. These allow the rule to examine both the request and the response and make sure that the data matches the required values.

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting.Rules
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Syntax

'Declaration
Public Overrides Sub Validate ( _
    sender As Object, _
    e As ValidationEventArgs _
)
public override void Validate(
    Object sender,
    ValidationEventArgs e
)
public:
virtual void Validate(
    Object^ sender, 
    ValidationEventArgs^ e
) override
abstract Validate : 
        sender:Object * 
        e:ValidationEventArgs -> unit  
override Validate : 
        sender:Object * 
        e:ValidationEventArgs -> unit
public override function Validate(
    sender : Object, 
    e : ValidationEventArgs
)

Parameters

  • sender
    Type: Object

    The source of the event.

Remarks

If the response does not match the required values, the ValidationEventArgs property IsValid is set to false, and the ValidationEventArgs property Message is set to a string that explains the problem.

If the response is valid, the ValidationEventArgs property IsValid is set to true.

.NET Framework Security

See Also

Reference

ValidateResponseUrl Class

Microsoft.VisualStudio.TestTools.WebTesting.Rules Namespace