C# Класс 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.
Наследование: ScrObjWrapper
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
m_CurrentWs int
m_SegmentMarkers List

Открытые методы

Метод Описание
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)

Защищенные методы

Метод Описание
LoadParatextProject ( string paratextProjectId ) : void

For testing, this is a no-op

Описание методов

CurrentWs() публичный Метод

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
Результат int

GetNextSegment() публичный Метод

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
Результат bool

LoadParatextProject() защищенный Метод

For testing, this is a no-op
protected LoadParatextProject ( string paratextProjectId ) : void
paratextProjectId string 3-letter Paratext project ID
Результат void

SetCurrentAnnotationType() публичный Метод

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.
Результат void

Описание свойств

m_CurrentWs публичное свойство

Set this to simulate an import stream having a specific ICU Locale
public int m_CurrentWs
Результат int

m_SegmentMarkers публичное свойство

Optional list of segment markers to process in a simulated import
public List m_SegmentMarkers
Результат List