Returns safely a default instance of the tested type.
Namespace:
MbUnit.Framework.ContractVerifiersAssembly: 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
| Exception | Condition |
|---|---|
| Gallio.Framework.Assertions..::.AssertionFailureException | Thrown if the instance cannot be generated. |
