C# Class Stumps.FluentStumpExtensions

A class that provides a set of Fluent extension methods to T:Stumps.Stump objects.
Exibir arquivo Open project: Cayan-LLC/stumps

Public Methods

Method Description
DelayedBy ( this stump, int delayMilliseconds ) : Stump

Specifies the amount of time the server delays before responding with the Stump.

DropsConnection ( this stump ) : Stump

Asserts that the T:Stumps.Stump will drop the connection immediately.

MatchingBody ( this stump, byte buffer ) : Stump

Requires the incoming HTTP request to match the specified body.

MatchingBodyContaining ( this stump, string text ) : Stump

Requires the incoming HTTP request to contain the specified text in the body.

MatchingHeader ( this stump, string headerName, string headerValue ) : Stump

Requires the incoming HTTP request to match the specified header.

MatchingMethod ( this stump, string httpMethod ) : Stump

Requires the incoming HTTP request to match the specified HTTP method.

MatchingRule ( this stump, IStumpRule rule ) : Stump

Requires the incoming HTTP request to match the specified T:Stumps.IStumpRule.

Responds ( this stump ) : BasicHttpResponse

Asserts that the T:Stumps.Stump will respond with a T:Stumps.BasicHttpResponse.

Private Methods

Method Description
CreateMd5Hash ( byte buffer ) : string

Creates an MD5 hash for the specified bytes.

MatchingUrl ( this stump, string url ) : Stump

Method Details

DelayedBy() public static method

Specifies the amount of time the server delays before responding with the Stump.
is null.
public static DelayedBy ( this stump, int delayMilliseconds ) : Stump
stump this The intercepting incomming HTTP requests.
delayMilliseconds int The amount of time, in milliseconds, the response is delayed.
return Stump

DropsConnection() public static method

Asserts that the T:Stumps.Stump will drop the connection immediately.
is null.
public static DropsConnection ( this stump ) : Stump
stump this The intercepting incomming HTTP requests.
return Stump

MatchingBody() public static method

Requires the incoming HTTP request to match the specified body.
is null.
public static MatchingBody ( this stump, byte buffer ) : Stump
stump this The intercepting incomming HTTP requests.
buffer byte The array of bytes for the body.
return Stump

MatchingBodyContaining() public static method

Requires the incoming HTTP request to contain the specified text in the body.
is null.
public static MatchingBodyContaining ( this stump, string text ) : Stump
stump this The intercepting incomming HTTP requests.
text string The text that must be contained within the body.
return Stump

MatchingHeader() public static method

Requires the incoming HTTP request to match the specified header.
is null.
public static MatchingHeader ( this stump, string headerName, string headerValue ) : Stump
stump this The intercepting incomming HTTP requests.
headerName string The name of the header to match.
headerValue string The value of the header to match.
return Stump

MatchingMethod() public static method

Requires the incoming HTTP request to match the specified HTTP method.
is null.
public static MatchingMethod ( this stump, string httpMethod ) : Stump
stump this The intercepting incomming HTTP requests.
httpMethod string The HTTP method to match.
return Stump

MatchingRule() public static method

Requires the incoming HTTP request to match the specified T:Stumps.IStumpRule.
is null.
public static MatchingRule ( this stump, IStumpRule rule ) : Stump
stump this The intercepting incomming HTTP requests.
rule IStumpRule The required to match.
return Stump

Responds() public static method

Asserts that the T:Stumps.Stump will respond with a T:Stumps.BasicHttpResponse.
is null.
public static Responds ( this stump ) : BasicHttpResponse
stump this The intercepting incomming HTTP requests.
return BasicHttpResponse