C# Class SIL.FieldWorks.TE.ImportTests.DummyScrObjWrapper

Dummy class for the TeImporter so we can test it. The tests that use the DummyTeImporter do not utilize a scr obj to read real data files. We'll provide this dummy version of the ScrObjWrapper instead, to minimize our overhead.
Inheritance: ScrObjWrapper
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Méthodes publiques

Свойство Type Description
m_CurrentWs int
m_SegmentMarkers List

Méthodes publiques

Méthode Description
CurrentWs ( int defaultWs ) : int

Since the tests don't actually have a real text enumerator or real files, return a surreal writing sytem.

GetNextSegment ( string &sText, string &sMarker, ImportDomain &domain ) : bool

Advance the scripture text object enumerator to the next segment. This override allows us to test the condition where an unexpected exception occurs during import processing. If m_SegmentMarkers is set to a list of n segments, then this method will throw an exception when asked for segment n+1.

SetCurrentAnnotationType ( int hvoAnnotationType ) : void

Sets the type of the current annotation (to facilitate testing)

Méthodes protégées

Méthode Description
LoadParatextProject ( string paratextProjectId ) : void

For testing, this is a no-op

Method Details

CurrentWs() public méthode

Since the tests don't actually have a real text enumerator or real files, return a surreal writing sytem.
public CurrentWs ( int defaultWs ) : int
defaultWs int
Résultat int

GetNextSegment() public méthode

Advance the scripture text object enumerator to the next segment. This override allows us to test the condition where an unexpected exception occurs during import processing. If m_SegmentMarkers is set to a list of n segments, then this method will throw an exception when asked for segment n+1.
public GetNextSegment ( string &sText, string &sMarker, ImportDomain &domain ) : bool
sText string Set to the text of the current segment
sMarker string Set to the marker of the current segment tag
domain ImportDomain Set to the domain of the stream being processed
Résultat bool

LoadParatextProject() protected méthode

For testing, this is a no-op
protected LoadParatextProject ( string paratextProjectId ) : void
paratextProjectId string 3-letter Paratext project ID
Résultat void

SetCurrentAnnotationType() public méthode

Sets the type of the current annotation (to facilitate testing)
public SetCurrentAnnotationType ( int hvoAnnotationType ) : void
hvoAnnotationType int HVO of the type of the current annotation.
Résultat void

Property Details

m_CurrentWs public_oe property

Set this to simulate an import stream having a specific ICU Locale
public int m_CurrentWs
Résultat int

m_SegmentMarkers public_oe property

Optional list of segment markers to process in a simulated import
public List m_SegmentMarkers
Résultat List