public BlockNodeParser( IElementParser elementParser, IWhenAttributeParser whenAttributeParser, IWhileAttributeParser whileAttributeParser, IMusicNodeParser musicNodeParser, IBackgroundNodeParser backgroundNodeParser, IPauseNodeParser pauseNodeParser, IProtagonistNodeParser protagonistNodeParser, IPersonNodeParser personNodeParser, INarrationNodeParser narrationNodeParser, ITutorialNodeParser tutorialNodeParser, ISetNodeParser setNodeParser, IUnsetNodeParser unsetNodeParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal( whenAttributeParser, whileAttributeParser, musicNodeParser, backgroundNodeParser, pauseNodeParser, protagonistNodeParser, personNodeParser, narrationNodeParser, tutorialNodeParser, setNodeParser, unsetNodeParser ); Settings.ChildParsers.Add(this); }
public void OnlyTextParser() { var parser = A.Dummy <ITextParser>(); var sut = ElementParserSettings.Normal(parser); sut.ShouldBeNormal(parser); }
public RootBlockParser( IElementParser elementParser, IMusicNodeParser musicNodeParser, IBackgroundNodeParser backgroundNodeParser, IBlockNodeParser blockNodeParser, IPauseNodeParser pauseNodeParser, IProtagonistNodeParser protagonistNodeParser, IPersonNodeParser personNodeParser, INarrationNodeParser narrationNodeParser, ITutorialNodeParser tutorialNodeParser, ISetNodeParser setNodeParser, IUnsetNodeParser unsetNodeParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal( musicNodeParser, backgroundNodeParser, blockNodeParser, pauseNodeParser, protagonistNodeParser, personNodeParser, narrationNodeParser, tutorialNodeParser, setNodeParser, unsetNodeParser ); }
public static ElementParserSettings Normal(params object[] parsers) { var settings = new ElementParserSettings(); foreach (var parser in parsers) { switch (parser) { case IAttributeParser attributeParser: settings.AttributeParsers.Add(attributeParser); break; case INodeParser nodeParser: settings.ChildParsers.Add(nodeParser); break; case ITextParser textParser: settings.TextParser = textParser; break; default: throw new ArgumentException($"Argumento do tipo '{parser.GetType().Name}' não é válido."); } } return(settings); }
public void OnlyNodeParser() { var parser = Helper.FakeParser <INodeParser>("a"); var sut = ElementParserSettings.Normal(parser); sut.ShouldBeNormal(parser); }
public UnsetNodeParser( IElementParser elementParser, INameTextParser nameTextParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(nameTextParser); }
public void InvalidArgument() { var ex = Assert.Throws <ArgumentException>( () => ElementParserSettings.Normal("gibberish") ); ex.Message.Should().Be("Argumento do tipo 'String' não é válido."); }
public MoodNodeParser( IElementParser elementParser, IMoodTextParser moodTextParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(moodTextParser); }
public ChoiceOptionDisabledTextNodeParser( IElementParser elementParser, IBalloonTextParser balloonTextParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(balloonTextParser); }
public void NonRepeat() { var nodeParser1 = Helper.FakeParser <INodeParser>("c"); var nodeParser2 = Helper.FakeParser <INodeParser>("d"); var sut = ElementParserSettings.NonRepeat(nodeParser1, nodeParser2); sut.ShouldBeNonRepeat(nodeParser1, nodeParser2); }
public BackgroundColorNodeParser( IElementParser elementParser, IWhenAttributeParser whenAttributeParser, IColorTextParser colorTextParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(whenAttributeParser, colorTextParser); }
public void Aggregated() { var nodeParser1 = Helper.FakeParser <INodeParser>("c"); var nodeParser2 = Helper.FakeParser <INodeParser>("d"); var sut = ElementParserSettings.Aggregated(nodeParser1, nodeParser2); sut.ShouldBeAggregated(nodeParser1, nodeParser2); }
public PauseNodeParser( IElementParser elementParser, IWhenAttributeParser whenAttributeParser, IIntegerTextParser integerTextParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(whenAttributeParser, integerTextParser); }
public BackgroundRightNodeParser( IElementParser elementParser, IWhenAttributeParser whenAttributeParser, IBackgroundImageTextParser backgroundImageTextParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(whenAttributeParser, backgroundImageTextParser); }
public ProtagonistNodeParser( IElementParser elementParser, IWhenAttributeParser whenAttributeParser, INameTextParser nameTextParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(whenAttributeParser, nameTextParser); }
public SetNodeParser( IVarSetParser varSetParser, IElementParser elementParser, IVarSetTextParser varSetTextParser ) { this.varSetParser = varSetParser; this.elementParser = elementParser; Settings = ElementParserSettings.Normal(varSetTextParser); }
public void Normal() { var textParser = A.Dummy <ITextParser>(); var attParser1 = Helper.FakeParser <IAttributeParser>("a"); var attParser2 = Helper.FakeParser <IAttributeParser>("b"); var nodeParser1 = Helper.FakeParser <INodeParser>("c"); var nodeParser2 = Helper.FakeParser <INodeParser>("d"); var sut = ElementParserSettings.Normal(textParser, attParser1, attParser2, nodeParser1, nodeParser2); sut.ShouldBeNormal(textParser, attParser1, attParser2, nodeParser1, nodeParser2); }
public BalloonTextNodeParserBase( IElementParser elementParser, IBalloonChildNodeParser childParser, ISetNodeParser setNodeParser, IUnsetNodeParser unsetNodeParser ) { this.elementParser = elementParser; this.childParser = childParser; Settings = ElementParserSettings.AggregatedNonRepeat(childParser); AggregationSettings = ElementParserSettings.Aggregated(childParser, setNodeParser, unsetNodeParser); }
public BalloonChildNodeParserBase( IElementParser elementParser, ITextSourceParser textSourceParser, IBalloonTextNodeParser balloonTextNodeParser, IChoiceNodeParser choiceNodeParser ) { this.elementParser = elementParser; this.textSourceParser = textSourceParser; this.childParser = balloonTextNodeParser; Settings = ElementParserSettings.AggregatedNonRepeat(balloonTextNodeParser); AggregationSettings = ElementParserSettings.AggregatedNonRepeat(choiceNodeParser); }
public ChoiceNodeParser( IElementParser elementParser, IChoiceTimeLimitNodeParser timeLimitNodeParser, IChoiceDefaultNodeParser defaultNodeParser, IChoiceOptionNodeParser optionNodeParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal( timeLimitNodeParser, defaultNodeParser, optionNodeParser ); }
public ChoiceOptionNodeParser( IElementParser elementParser, IWhenAttributeParser whenAttributeParser, IBalloonTextParser balloonTextParser, IChoiceOptionTextNodeParser choiceOptionTextNodeParser, IChoiceOptionEnabledWhenNodeParser choiceOptionEnabledWhenNodeParser, IChoiceOptionDisabledTextNodeParser choiceOptionDisabledTextNodeParser, IChoiceOptionIconNodeParser choiceOptionIconNodeParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.NonRepeat( whenAttributeParser, balloonTextParser, choiceOptionTextNodeParser, choiceOptionEnabledWhenNodeParser, choiceOptionDisabledTextNodeParser, choiceOptionIconNodeParser ); }
public BackgroundNodeParser( IElementParser elementParser, IWhenAttributeParser whenAttributeParser, IBackgroundImageTextParser backgroundImageTextParser, IBackgroundColorNodeParser backgroundColorNodeParser, IBackgroundLeftNodeParser backgroundLeftNodeParser, IBackgroundRightNodeParser backgroundRightNodeParser, IBackgroundScrollNodeParser backgroundScrollNodeParser, IPauseNodeParser pauseNodeParser ) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal( whenAttributeParser, backgroundImageTextParser, backgroundColorNodeParser, backgroundLeftNodeParser, backgroundRightNodeParser, backgroundScrollNodeParser, pauseNodeParser ); }
public PersonNodeParser( IElementParser elementParser, IPersonTextNodeParser personTextNodeParser, ISpeechNodeParser speechNodeParser, IThoughtNodeParser thoughtNodeParser, IMoodNodeParser moodNodeParser, IPauseNodeParser pauseNodeParser, ISetNodeParser setNodeParser, IUnsetNodeParser unsetNodeParser ) { this.elementParser = elementParser; this.childParser = personTextNodeParser; Settings = ElementParserSettings.AggregatedNonRepeat(childParser); AggregationSettings = ElementParserSettings.Aggregated( speechNodeParser, thoughtNodeParser, moodNodeParser, pauseNodeParser, setNodeParser, unsetNodeParser ); }
public BackgroundScrollNodeParser(IElementParser elementParser, IWhenAttributeParser whenAttributeParser) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(whenAttributeParser); }
public ChoiceTimeLimitNodeParser(IElementParser elementParser, IIntegerTextParser textParser) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(textParser); }
public GenericTextNodeParserBase(IElementParser elementParser, ITextParser textParser) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(textParser); }
public ChoiceOptionIconNodeParser(IElementParser elementParser, INameTextParser nameTextParser) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(nameTextParser); }
public ChoiceOptionEnabledWhenNodeParser(IElementParser elementParser, IBalloonTextParser textParser, IConditionParser conditionParser) { this.elementParser = elementParser; this.conditionParser = conditionParser; Settings = ElementParserSettings.Normal(textParser); }
public ChoiceDefaultNodeParser(IElementParser elementParser, INameTextParser textParser) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(textParser); }
public ChoiceRandomOrderNodeParser(IElementParser elementParser) { this.elementParser = elementParser; Settings = ElementParserSettings.Normal(); }