C# Класс SIL.FieldWorks.TE.ImportTests.DummyTeImporter

Dummy class for the TeImporter so we can test it.
Наследование: TeSfmImporter
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
m_SegmentMarkers List
s_consultantNoteDefn ICmAnnotationDefn
s_translatorNoteDefn ICmAnnotationDefn

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

Метод Описание
AddImportStyleProxyForMapping ( SIL.FieldWorks.FDO.Scripture.ImportMappingInfo mapping, ImportStyleProxy>.Dictionary styleProxies ) : void

Exposes the TeSfmImporter.AddImportStyleProxyForMapping method

AddTextToPara ( string sText, ITsTextProps pttpProps ) : void

Exposes the TeSfmImporter.AddTextToPara(string, ITsTextProps) method

FinalizeImport ( ) : void

Exposes the TeSfmImporter.FinalizeImport method

FindCorrespondingFootnote ( int ws, string styleId ) : IScrFootnote

Exposes the TeSfmImporter.FindCorrespondingFootnote(string) method

FindCorrespondingVernParaForSegment ( IStStyle style, SILUBS.SharedScrUtils.BCVRef targetRef, int iPara ) : IStTxtPara

Find a paragraph with the specified style id, containing the specified verse number, if specified, and having the correct sequence number. Sets all appropriate state variables before returning.

GetFootnote ( int iFootnoteIndex ) : IStFootnote

Get the requested footnote.

GetVerseRefAsString ( int wsBt ) : string

Exposes the TeSfmImporter.GetVerseRefAsString method.

Import ( ) : void

Exposes the TeImporter.Import method

Initialize ( ) : void

Exposes the TeSfmImporter.Initialize method

MakeParatextTestSettings ( IScrImportSet settings ) : void

Populate settings as if user had used the Import Wizard to choose a Paratext project and set up mappings.

MakeSFImportTestSettings ( IScrImportSet settings ) : void

Populate settings as if user had used the Import Wizard to choose a SF project and set up mappings appropriate for TOB data files.

ProcessSegment ( string sText, string sMarker ) : void

Exposes the TeSfmImporter.ProcessSegment method

SetUpMappings ( IScrImportSet settings ) : void

Set up appropriate mappings for the TEV and TOB data files.

StopImport ( ) : void

Simulates the user stopping an import.

VerifyAnnotationText ( IStText text, string fieldName, string expectedContents, int expectedWs ) : void

Verifies that StText field for an annotation was initialized properly.

VerifyInitializedNoteText ( IStText text, string fieldName ) : void

Verifies that StText field for an annotation was initialized properly.

VerifySimpleFootnote ( int iFootnoteIndex, string sFootnoteSegment, int iAutoNumberedFootnoteIndex, string sMarker, string sParaStyleName, int runCount ) : ITsString

Tests that a footnote has been created in the DB with a single default run having the specified text.

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

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
CallFinalizePrevSection ( IScrSection section, ImportDomain prevImportDomain, bool fInScriptureText ) : void

Calls the FinalizePrevSection() method.

DummyTeImporter ( IScrImportSet settings, FdoTestBase testBase, FwStyleSheet styleSheet ) : System
InitScriptureObject ( ) : void

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

AddImportStyleProxyForMapping() публичный метод

Exposes the TeSfmImporter.AddImportStyleProxyForMapping method
public AddImportStyleProxyForMapping ( SIL.FieldWorks.FDO.Scripture.ImportMappingInfo mapping, ImportStyleProxy>.Dictionary styleProxies ) : void
mapping SIL.FieldWorks.FDO.Scripture.ImportMappingInfo The mapping for which the proxy entry is to be created
styleProxies ImportStyleProxy>.Dictionary Dictionary to add the proxy to
Результат void

AddTextToPara() публичный метод

Exposes the TeSfmImporter.AddTextToPara(string, ITsTextProps) method
public AddTextToPara ( string sText, ITsTextProps pttpProps ) : void
sText string Text to be appended to the paragraph being built
pttpProps ITsTextProps Properties (should contain only a named style) for the run /// of text to be added.
Результат void

Dispose() защищенный метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

FinalizeImport() публичный метод

Exposes the TeSfmImporter.FinalizeImport method
public FinalizeImport ( ) : void
Результат void

FindCorrespondingFootnote() публичный метод

Exposes the TeSfmImporter.FindCorrespondingFootnote(string) method
public FindCorrespondingFootnote ( int ws, string styleId ) : IScrFootnote
ws int The writing system of the current BT
styleId string style of footnote to find
Результат IScrFootnote

FindCorrespondingVernParaForSegment() публичный метод

Find a paragraph with the specified style id, containing the specified verse number, if specified, and having the correct sequence number. Sets all appropriate state variables before returning.
public FindCorrespondingVernParaForSegment ( IStStyle style, SILUBS.SharedScrUtils.BCVRef targetRef, int iPara ) : IStTxtPara
style IStStyle style of paragraph to find
targetRef SILUBS.SharedScrUtils.BCVRef Reference to seek
iPara int 0-based index of paragraph
Результат IStTxtPara

GetFootnote() публичный метод

Get the requested footnote.
public GetFootnote ( int iFootnoteIndex ) : IStFootnote
iFootnoteIndex int zero-based footnote index
Результат IStFootnote

GetVerseRefAsString() публичный метод

Exposes the TeSfmImporter.GetVerseRefAsString method.
public GetVerseRefAsString ( int wsBt ) : string
wsBt int
Результат string

Import() публичный метод

Exposes the TeImporter.Import method
public Import ( ) : void
Результат void

Initialize() публичный метод

Exposes the TeSfmImporter.Initialize method
public Initialize ( ) : void
Результат void

MakeParatextTestSettings() статический публичный метод

Populate settings as if user had used the Import Wizard to choose a Paratext project and set up mappings.
static public MakeParatextTestSettings ( IScrImportSet settings ) : void
settings IScrImportSet The settings object to be populated
Результат void

MakeSFImportTestSettings() статический публичный метод

Populate settings as if user had used the Import Wizard to choose a SF project and set up mappings appropriate for TOB data files.
static public MakeSFImportTestSettings ( IScrImportSet settings ) : void
settings IScrImportSet The settings object to be populated
Результат void

ProcessSegment() публичный метод

Exposes the TeSfmImporter.ProcessSegment method
public ProcessSegment ( string sText, string sMarker ) : void
sText string text to import
sMarker string standard format marker
Результат void

SetUpMappings() статический публичный метод

Set up appropriate mappings for the TEV and TOB data files.
static public SetUpMappings ( IScrImportSet settings ) : void
settings IScrImportSet The settings object to be set up
Результат void

StopImport() публичный метод

Simulates the user stopping an import.
public StopImport ( ) : void
Результат void

VerifyAnnotationText() публичный метод

Verifies that StText field for an annotation was initialized properly.
public VerifyAnnotationText ( IStText text, string fieldName, string expectedContents, int expectedWs ) : void
text IStText given StText
fieldName string name of field
expectedContents string Expected contents of (first and only) para (may be /// null)
expectedWs int Expected writing system ID (ignored if expectedContents is /// null)
Результат void

VerifyInitializedNoteText() публичный метод

Verifies that StText field for an annotation was initialized properly.
public VerifyInitializedNoteText ( IStText text, string fieldName ) : void
text IStText given StText
fieldName string name of field
Результат void

VerifySimpleFootnote() публичный метод

Tests that a footnote has been created in the DB with a single default run having the specified text.
public VerifySimpleFootnote ( int iFootnoteIndex, string sFootnoteSegment, int iAutoNumberedFootnoteIndex, string sMarker, string sParaStyleName, int runCount ) : ITsString
iFootnoteIndex int zero-based footnote index
sFootnoteSegment string Expected footnote contents
iAutoNumberedFootnoteIndex int zero-based index of this footnote /// in list of all auto-numbered footnotes. This could the be the third footnote /// overall, but only the second auto-numbered footnote.
sMarker string One of: "a", for automatic alpha sequence; "*", /// for a literal marker (we always use "*" in these tests); or string.Empty, /// for no marker
sParaStyleName string Name of the paragraph style
runCount int Number of runs expected in the footnote para
Результат ITsString

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

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

Tests can set this to simulate importing a sequence of segments
public List m_SegmentMarkers
Результат List

s_consultantNoteDefn публичное статическое свойство

public static ICmAnnotationDefn s_consultantNoteDefn
Результат ICmAnnotationDefn

s_translatorNoteDefn публичное статическое свойство

public static ICmAnnotationDefn s_translatorNoteDefn
Результат ICmAnnotationDefn