ClassTextBlockDisplayedTextVerificationDescriptor
Verify displayed text of TextBlock
Definition
Namespace:ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors
Assembly:ArtOfTest.WebAii.Design.dll
Syntax:
[DataContract(Namespace = "http://artoftest.com/schemas/WebAiiDesignCanvas/2.0.0")]
[Sentence("Displayed Text", " displayed text {Comparison} {Value}", false)]
public class TextBlockDisplayedTextVerificationDescriptor : XamlVerificationDescriptor, INotifyPropertyChanged, ICustomTypeDescriptor, IExtensibleDataObject, IInspectWebSettings, IQuickTasks, ISentenceListPreview, IExtendedParamEditorInfo
Inheritance: objectDataBoundObjectAutomationDescriptorVerificationDescriptorXamlVerificationDescriptorTextBlockDisplayedTextVerificationDescriptor
Implements:
Inherited Members
Constructors
TextBlockDisplayedTextVerificationDescriptor()
Create new instance of TextBlockDisplayedTextVerificationDescriptor class.
Declaration
public TextBlockDisplayedTextVerificationDescriptor()
TextBlockDisplayedTextVerificationDescriptor(IFrameworkElement, string, string)
Create a new TextBlockVerificationDescriptor
Declaration
public TextBlockDisplayedTextVerificationDescriptor(IFrameworkElement textBlock, string comparison, string expected)
Parameters
textBlock
The target TextBlock
comparison
expected
The string that the target is expected to contain
Properties
Comparer
Declaration
[Browsable(false)]
[DataMember(Name = "Comparer")]
protected virtual VerificationComparer Comparer { get; set; }
Property Value
Comparison
Declaration
[DataMember(Name = "Comparison")]
[SentenceParam("comparison?", AutomationDescriptorType.Wait|AutomationDescriptorType.Verification|AutomationDescriptorType.Extraction, StaticValueListMethod = "PopulateComparisonList", DisableTextBoxEdit = true)]
public virtual string Comparison { get; set; }
Property Value
FriendlyDescription
Get a friendly description of this descriptor to show in the scenario explorer.
Declaration
public override string FriendlyDescription { get; }
Property Value
Overrides
Methods
ExtractData(IApplication, DescriptorValueStore)
Declaration
public override void ExtractData(IApplication hostApp, DescriptorValueStore dataStore)
Parameters
hostApp
dataStore
Overrides
GeneratePreviewValuesForTarget(DescriptorValueStoreCollection)
Given a target element, generate an array of values for the descriptor implementing this interface.
Declaration
public void GeneratePreviewValuesForTarget(DescriptorValueStoreCollection valuesCollection)
Parameters
valuesCollection
DescriptorValueStoreCollection
Collection to add values to
Implements
GetCompareType(string)
Declaration
protected virtual XamlStringCompareType GetCompareType(string strValue)
Parameters
strValue
Returns
GetExtendedEditorInfo(DescriptorValueStore)
Collect additional values for each parameter to be used by the editor
Declaration
public void GetExtendedEditorInfo(DescriptorValueStore valueStore)
Parameters
valueStore
The value store to add values in
Implements
OnParameterChanged(SentenceParam, Sentence)
Called when a parameter value has changed
Declaration
public void OnParameterChanged(SentenceParam param, Sentence context)
Parameters
param
The parameter that changed
context
The context/sentence that this parameter is part of.
Implements
OnSentenceLoad(Sentence)
Called when the sentence is first loaded. Allows for setting initial values for each sentence if needed
Declaration
public void OnSentenceLoad(Sentence context)
Parameters
context
The sentence context.
Implements
PopulateComparisonList(SentenceParam)
Declaration
public virtual object PopulateComparisonList(SentenceParam sentenceParam)
Parameters
sentenceParam
Returns
ToCode()
This method is called when the user requests code generation. The framework initializes the TestMethod property of this object with a new instance that this method simply needs to add its custom codegen to it.
Declaration
public override void ToCode()
Overrides
ValueCompare(DescriptorValueStore, object)
Declaration
public virtual bool ValueCompare(DescriptorValueStore dataStore, object value)
Parameters
dataStore
value
Returns
Verify(DescriptorValueStore)
Given a value store, verify against the constraints defined by this descriptor
Declaration
public override VerificationResult Verify(DescriptorValueStore dataStore)
Parameters
dataStore
The data store were values are captured
Returns
The verification result.
Overrides