DatabaseUnitTestingServices.CanGenerateScript Method

Called to determine if the specified IModelElement is in a state such that a script can be generated to test it.

Namespace:  Microsoft.Data.Schema.UnitTesting.Extensibility
Assembly:  Microsoft.Data.Schema.UnitTesting (in Microsoft.Data.Schema.UnitTesting.dll)

Syntax

'Declaration
Public MustOverride Function CanGenerateScript ( _
    dataSchemaModel As DataSchemaModel, _
    elementToTest As IModelElement _
) As Boolean
'Usage
Dim instance As DatabaseUnitTestingServices
Dim dataSchemaModel As DataSchemaModel
Dim elementToTest As IModelElement
Dim returnValue As Boolean

returnValue = instance.CanGenerateScript(dataSchemaModel, _
    elementToTest)
public abstract bool CanGenerateScript(
    DataSchemaModel dataSchemaModel,
    IModelElement elementToTest
)
public:
virtual bool CanGenerateScript(
    DataSchemaModel^ dataSchemaModel, 
    IModelElement^ elementToTest
) abstract
public abstract function CanGenerateScript(
    dataSchemaModel : DataSchemaModel, 
    elementToTest : IModelElement
) : boolean
abstract CanGenerateScript : 
        dataSchemaModel:DataSchemaModel * 
        elementToTest:IModelElement -> bool 

Parameters

Return Value

Type: System.Boolean

Remarks

It is possible for objects to be in an error state such that it is impossible to generate a meaningful test.

This method is called by the unit test infrastructure only if ScriptGenerationSupported(...) returns true for the element's ElementClass. This method is called by the unit test infrastructure when building the "create unit tests" dialog.

.NET Framework Security

See Also

Reference

DatabaseUnitTestingServices Class

DatabaseUnitTestingServices Members

Microsoft.Data.Schema.UnitTesting.Extensibility Namespace