C# Class Habanero.Testability.BODefaultValueRegistry

This is a registry of the BOTestValues for various Properties and Single Relationships of a BusinessObject. This was creates so as to allow the Developer to BOTestFactory{TBO}.SetValueFor{TReturn} and such that when the Object is created with the BOTestFactory.CreateBusinessObject etc or updated with BOTestFactory.UpdateCompulsoryProperties this will be the value used.
Mostrar archivo Open project: Chillisoft/habanero.testability

Public Methods

Method Description
IsRegistered ( string methodName ) : bool

Returns True if a value is registered with the name methodName

Register ( string methodName, object defaultValue ) : void

Registers the Default value to be used for the Method

Resolve ( string methodName ) : object

Resolves the registered BOTestFactory if one is registered. Else tries to find a Sub Class of the Generic BOTestFactory{TBO} in the App Domain and returns an instance of it. else constructs the Generic BOTestFactory{TBO}

Private Methods

Method Description
ClearPreviousInstances ( string methodName ) : void

Method Details

IsRegistered() public method

Returns True if a value is registered with the name methodName
public IsRegistered ( string methodName ) : bool
methodName string
return bool

Register() public method

Registers the Default value to be used for the Method
public Register ( string methodName, object defaultValue ) : void
methodName string
defaultValue object
return void

Resolve() public method

Resolves the registered BOTestFactory if one is registered. Else tries to find a Sub Class of the Generic BOTestFactory{TBO} in the App Domain and returns an instance of it. else constructs the Generic BOTestFactory{TBO}
public Resolve ( string methodName ) : object
methodName string
return object