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
- dataSchemaModel
Type: Microsoft.Data.Schema.SchemaModel.DataSchemaModel
The data schema model
- elementToTest
Type: Microsoft.Data.Schema.SchemaModel.IModelElement
The element to test
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
DatabaseUnitTestingServices Class