C# Class CardShopTest.ControllerTests.ControllerUtility

Mostra file Open project: egreene/PracticeGDVP

Public Properties

Property Type Description
httpContext Mock
httpRequest Mock

Public Methods

Method Description
mockRequest ( Type type ) : Controller
mockRequestWithNVC ( Type type, NameValueCollection collection ) : Controller

The properties of the controller are added as public static attributes so that tests can edit them and setup whatever they need for their tests. all of the setups used in the mockRequestWithNVC are verifyable so that tests can verify anything further.

setSession ( ) : void

Method Details

mockRequest() public static method

public static mockRequest ( Type type ) : Controller
type System.Type
return Controller

mockRequestWithNVC() public static method

The properties of the controller are added as public static attributes so that tests can edit them and setup whatever they need for their tests. all of the setups used in the mockRequestWithNVC are verifyable so that tests can verify anything further.
public static mockRequestWithNVC ( Type type, NameValueCollection collection ) : Controller
type System.Type
collection System.Collections.Specialized.NameValueCollection
return Controller

setSession() public static method

public static setSession ( ) : void
return void

Property Details

httpContext public_oe static_oe property

public static Mock httpContext
return Mock

httpRequest public_oe static_oe property

public static Mock httpRequest
return Mock