C# Class IronFramework.TestCommon.HttpAssert

Unit test utility for testing HttpResponseMessage instances.
Mostra file Open project: megadotnet/ironframework

Public Methods

Method Description
CanRoundTrip ( Type type ) : bool
Contains ( HttpHeaders headers, string name ) : void

Asserts the given HttpHeaders contain the given values for the given name.

Equal ( HttpHeaders expectedHeaders, HttpHeaders actualHeaders ) : void

Asserts that the expected HttpHeaders instance is equal to the actual actualHeaders instance.

Equal ( HttpRequestMessage expected, HttpRequestMessage actual ) : void

Asserts that the expected HttpRequestMessage is equal to the actual HttpRequestMessage.

Equal ( HttpResponseMessage expected, HttpResponseMessage actual ) : void

Asserts that the expected HttpResponseMessage is equal to the actual HttpResponseMessage.

Equal ( HttpResponseMessage expected, HttpResponseMessage actual, string>.Action verifyContentStringCallback ) : void

Asserts that the expected HttpResponseMessage is equal to the actual HttpResponseMessage.

IsKnownUnserializable ( Type type, object obj ) : bool
IsKnownUnserializable ( Type type, object obj, bool>.Func isTypeUnserializableCallback ) : bool
IsKnownUnserializableType ( Type type, bool>.Func isTypeUnserializableCallback ) : bool

Private Methods

Method Description
CleanContentString ( string content ) : string
HandleDateHeader ( string expectedDateHeaderValues, string actualDateHeaderValues ) : void

Method Details

CanRoundTrip() public method

public CanRoundTrip ( Type type ) : bool
type System.Type
return bool

Contains() public method

Asserts the given HttpHeaders contain the given values for the given name.
public Contains ( HttpHeaders headers, string name ) : void
headers HttpHeaders The to examine. It cannot be null.
name string The name of the header. It cannot be empty.
return void

Equal() public method

Asserts that the expected HttpHeaders instance is equal to the actual actualHeaders instance.
public Equal ( HttpHeaders expectedHeaders, HttpHeaders actualHeaders ) : void
expectedHeaders HttpHeaders The expected instance. Should not be null.
actualHeaders HttpHeaders The actual instance. Should not be null.
return void

Equal() public method

Asserts that the expected HttpRequestMessage is equal to the actual HttpRequestMessage.
public Equal ( HttpRequestMessage expected, HttpRequestMessage actual ) : void
expected System.Net.Http.HttpRequestMessage The expected . Should not be null.
actual System.Net.Http.HttpRequestMessage The actual . Should not be null.
return void

Equal() public method

Asserts that the expected HttpResponseMessage is equal to the actual HttpResponseMessage.
public Equal ( HttpResponseMessage expected, HttpResponseMessage actual ) : void
expected System.Net.Http.HttpResponseMessage The expected . Should not be null.
actual System.Net.Http.HttpResponseMessage The actual . Should not be null.
return void

Equal() public method

Asserts that the expected HttpResponseMessage is equal to the actual HttpResponseMessage.
public Equal ( HttpResponseMessage expected, HttpResponseMessage actual, string>.Action verifyContentStringCallback ) : void
expected System.Net.Http.HttpResponseMessage The expected . Should not be null.
actual System.Net.Http.HttpResponseMessage The actual . Should not be null.
verifyContentStringCallback string>.Action
return void

IsKnownUnserializable() public method

public IsKnownUnserializable ( Type type, object obj ) : bool
type System.Type
obj object
return bool

IsKnownUnserializable() public method

public IsKnownUnserializable ( Type type, object obj, bool>.Func isTypeUnserializableCallback ) : bool
type System.Type
obj object
isTypeUnserializableCallback bool>.Func
return bool

IsKnownUnserializableType() public method

public IsKnownUnserializableType ( Type type, bool>.Func isTypeUnserializableCallback ) : bool
type System.Type
isTypeUnserializableCallback bool>.Func
return bool