public PoFileParser(IFileHelper fileHelper, ILineParser lineParser, ISegmentSettings defaultSegmentSettings, IParagraphUnitFactory paragraphUnitFactory, IEntryBuilder entryBuilder) { _fileHelper = fileHelper; _lineParser = lineParser; _segmentSettings = defaultSegmentSettings; _paragraphUnitFactory = paragraphUnitFactory; _entryBuilder = entryBuilder; }
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" } }); }