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

Dummy class for the TeImporter so we can test it.
Inheritance: TeSfmImporter
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Méthodes publiques

Свойство Type Description
m_SegmentMarkers List
s_consultantNoteDefn ICmAnnotationDefn
s_translatorNoteDefn ICmAnnotationDefn

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Private Methods

Méthode Description
CallFinalizePrevSection ( IScrSection section, ImportDomain prevImportDomain, bool fInScriptureText ) : void

Calls the FinalizePrevSection() method.

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

Method Details

AddImportStyleProxyForMapping() public méthode

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
Résultat void

AddTextToPara() public méthode

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.
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

FinalizeImport() public méthode

Exposes the TeSfmImporter.FinalizeImport method
public FinalizeImport ( ) : void
Résultat void

FindCorrespondingFootnote() public méthode

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
Résultat IScrFootnote

FindCorrespondingVernParaForSegment() public méthode

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
Résultat IStTxtPara

GetFootnote() public méthode

Get the requested footnote.
public GetFootnote ( int iFootnoteIndex ) : IStFootnote
iFootnoteIndex int zero-based footnote index
Résultat IStFootnote

GetVerseRefAsString() public méthode

Exposes the TeSfmImporter.GetVerseRefAsString method.
public GetVerseRefAsString ( int wsBt ) : string
wsBt int
Résultat string

Import() public méthode

Exposes the TeImporter.Import method
public Import ( ) : void
Résultat void

Initialize() public méthode

Exposes the TeSfmImporter.Initialize method
public Initialize ( ) : void
Résultat void

MakeParatextTestSettings() static public méthode

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
Résultat void

MakeSFImportTestSettings() static public méthode

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
Résultat void

ProcessSegment() public méthode

Exposes the TeSfmImporter.ProcessSegment method
public ProcessSegment ( string sText, string sMarker ) : void
sText string text to import
sMarker string standard format marker
Résultat void

SetUpMappings() static public méthode

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
Résultat void

StopImport() public méthode

Simulates the user stopping an import.
public StopImport ( ) : void
Résultat void

VerifyAnnotationText() public méthode

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)
Résultat void

VerifyInitializedNoteText() public méthode

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
Résultat void

VerifySimpleFootnote() public méthode

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
Résultat ITsString

Property Details

m_SegmentMarkers public_oe property

Tests can set this to simulate importing a sequence of segments
public List m_SegmentMarkers
Résultat List

s_consultantNoteDefn public_oe static_oe property

public static ICmAnnotationDefn s_consultantNoteDefn
Résultat ICmAnnotationDefn

s_translatorNoteDefn public_oe static_oe property

public static ICmAnnotationDefn s_translatorNoteDefn
Résultat ICmAnnotationDefn