示例#1
0
 public void SetUp()
 {
     _yamlTextReaderMock               = A.Fake <IYamlTextReader>();
     _bilingualContentHandlerMock      = A.Fake <IBilingualContentHandler>();
     _embeddedContentRegexSettingsMock = A.Fake <IEmbeddedContentRegexSettings>();
     _parsingSettingsMock              = A.Fake <IParsingSettings>();
     _paragraphUnitFactoryMock         = A.Fake <IParagraphUnitFactory>();
     _propertiesFactoryMock            = A.Fake <IPropertiesFactory>();
     _segmendDataCollectorMock         = A.Fake <ISegmentDataCollector>();
     _itemFactoryMock = A.Fake <IDocumentItemFactory>();
     A.CallTo(() => _itemFactoryMock.PropertiesFactory).Returns(_propertiesFactoryMock);
 }
示例#2
0
        public void SetUp()
        {
            _propertiesFactoryMock = A.Fake <IPropertiesFactory>();

            _itemFactoryMock = A.Fake <IDocumentItemFactory>();
            A.CallTo(() => _itemFactoryMock.PropertiesFactory).Returns(_propertiesFactoryMock);

            _bilingualContentHandlerMock = A.Fake <IBilingualContentHandler>();

            _segmentSettingsMock = A.Fake <ISegmentSettings>();

            _paragraphUnitFactoryMock = A.Fake <IParagraphUnitFactory>();

            _lineParserMock         = A.Fake <ILineParser>();
            _entryBuilderMock       = A.Fake <IEntryBuilder>();
            _lineParsingSessionMock = A.Fake <ILineParsingSession>();
            A.CallTo(() => _lineParserMock.StartLineParsingSession()).Returns(_lineParsingSessionMock);

            MathParseResultWithEntry(null, new ParseResult(LineType.Empty, string.Empty), null);

            MathParseResultWithEntry(@"entryComplete", new ParseResult(LineType.MessageString, "message string"),
                                     new Entry
            {
                MessageId     = "message id",
                MessageString = "message string"
            });

            MathParseResultWithEntry(@"emptyMsgidEntryComplete", new ParseResult(LineType.MessageId, string.Empty),
                                     new Entry
            {
                MessageId     = string.Empty,
                MessageString = "message string"
            });

            MathParseResultWithEntry(@"msgstrPluralEntryComplete",
                                     new ParseResult(LineType.MessageStringPlural, "message string 2"), new Entry
            {
                MessageId            = "message id",
                MessageIdPlural      = "message id plural",
                MessageStringPlurals = new List <string>
                {
                    "message string 0",
                    "message string 1",
                    "message string 2"
                }
            });
        }