Returns safely a default instance of the tested type.

Namespace:  MbUnit.Framework.ContractVerifiers
Assembly:  MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)

Syntax

C#
protected TCollection GetSafeDefaultInstance()
Visual Basic (Declaration)
Protected Function GetSafeDefaultInstance As TCollection

Return Value

A new instance of the tested type as specified in the contract.

Remarks

An assertion failure is generated if the instance cannot be created.

Exceptions

ExceptionCondition
Gallio.Framework.Assertions..::.AssertionFailureExceptionThrown if the instance cannot be generated.

See Also