C# Class SIL.FieldWorks.FDO.FDOTests.InterlinearTestBase.ConceptualModelXmlParagraphValidator

This validates the actual IStTxtPara against an expected Xml paragraph structure that is based on the conceptual model.
Inheritance: FdoValidator
Afficher le fichier Open project: sillsdev/FieldWorks

Méthodes protégées

Méthode Description
GetActualSegmentForms ( ISegment actualSegment ) : IList

GetExpectedSegmentForms ( object expectedSegment ) : ArrayList

GetExpectedSegments ( XmlNode expectedParaInfo ) : List

Get a list of the XmlNodes (CmBaseAnnotations in the Segments16 property) of the input XmlNode, which represents an StTxtPara in our test data.

GetParagraphContext ( object expectedParaInfo ) : string

ValidateSegFormOuterElements ( object expectedSegForm, IAnalysis actualSegForm, string segFormContext ) : void

This awkwardly named method fits into a pattern of names for validating the outer (XML attributes) and inner (XML content) parts of an XML representation of an expected value. In this case, for an IAnalysis, the only thing we can verify is that it is the right object.

ValidateSegmentOuterElements ( object expectedSegment, ISegment actualSegment, string segmentContext ) : void

Validate the "outer" information of an XmlNode representing the expected segment. That is basically its attributes, which currently just means its beginOffset. Note that these offsets are not stored in the file, but (todo!) generated while assembling the paragraph.

Private Methods

Méthode Description
CompareAnalyses ( object expectedNode, IAnalysis actualAnalysis, string context ) : void
ConceptualModelXmlParagraphValidator ( ParagraphBuilder pb ) : System
ValidateActualParagraphAgainstDefn ( ) : void

Method Details

GetActualSegmentForms() protected méthode

protected GetActualSegmentForms ( ISegment actualSegment ) : IList
actualSegment ISegment
Résultat IList

GetExpectedSegmentForms() protected méthode

protected GetExpectedSegmentForms ( object expectedSegment ) : ArrayList
expectedSegment object
Résultat System.Collections.ArrayList

GetExpectedSegments() protected méthode

Get a list of the XmlNodes (CmBaseAnnotations in the Segments16 property) of the input XmlNode, which represents an StTxtPara in our test data.
protected GetExpectedSegments ( XmlNode expectedParaInfo ) : List
expectedParaInfo System.Xml.XmlNode
Résultat List

GetParagraphContext() protected méthode

protected GetParagraphContext ( object expectedParaInfo ) : string
expectedParaInfo object
Résultat string

ValidateSegFormOuterElements() protected méthode

This awkwardly named method fits into a pattern of names for validating the outer (XML attributes) and inner (XML content) parts of an XML representation of an expected value. In this case, for an IAnalysis, the only thing we can verify is that it is the right object.
protected ValidateSegFormOuterElements ( object expectedSegForm, IAnalysis actualSegForm, string segFormContext ) : void
expectedSegForm object
actualSegForm IAnalysis
segFormContext string
Résultat void

ValidateSegmentOuterElements() protected méthode

Validate the "outer" information of an XmlNode representing the expected segment. That is basically its attributes, which currently just means its beginOffset. Note that these offsets are not stored in the file, but (todo!) generated while assembling the paragraph.
protected ValidateSegmentOuterElements ( object expectedSegment, ISegment actualSegment, string segmentContext ) : void
expectedSegment object
actualSegment ISegment
segmentContext string
Résultat void