Example #1
0
    public void OnlyTextParser()
    {
        var parser = A.Dummy <ITextParser>();
        var sut    = ElementParserSettings.Normal(parser);

        sut.ShouldBeNormal(parser);
    }
Example #2
0
    public void OnlyNodeParser()
    {
        var parser = Helper.FakeParser <INodeParser>("a");
        var sut    = ElementParserSettings.Normal(parser);

        sut.ShouldBeNormal(parser);
    }
Example #3
0
 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);
 }
Example #4
0
 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
         );
 }
Example #5
0
 public ChoiceOptionDisabledTextNodeParser(
     IElementParser elementParser,
     IBalloonTextParser balloonTextParser
     )
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(balloonTextParser);
 }
Example #6
0
 public MoodNodeParser(
     IElementParser elementParser,
     IMoodTextParser moodTextParser
     )
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(moodTextParser);
 }
Example #7
0
 public UnsetNodeParser(
     IElementParser elementParser,
     INameTextParser nameTextParser
     )
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(nameTextParser);
 }
Example #8
0
    public void InvalidArgument()
    {
        var ex = Assert.Throws <ArgumentException>(
            () => ElementParserSettings.Normal("gibberish")
            );

        ex.Message.Should().Be("Argumento do tipo 'String' não é válido.");
    }
Example #9
0
 public ProtagonistNodeParser(
     IElementParser elementParser,
     IWhenAttributeParser whenAttributeParser,
     INameTextParser nameTextParser
     )
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(whenAttributeParser, nameTextParser);
 }
Example #10
0
 public BackgroundColorNodeParser(
     IElementParser elementParser,
     IWhenAttributeParser whenAttributeParser,
     IColorTextParser colorTextParser
     )
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(whenAttributeParser, colorTextParser);
 }
Example #11
0
 public BackgroundRightNodeParser(
     IElementParser elementParser,
     IWhenAttributeParser whenAttributeParser,
     IBackgroundImageTextParser backgroundImageTextParser
     )
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(whenAttributeParser, backgroundImageTextParser);
 }
Example #12
0
 public PauseNodeParser(
     IElementParser elementParser,
     IWhenAttributeParser whenAttributeParser,
     IIntegerTextParser integerTextParser
     )
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(whenAttributeParser, integerTextParser);
 }
Example #13
0
 public SetNodeParser(
     IVarSetParser varSetParser,
     IElementParser elementParser,
     IVarSetTextParser varSetTextParser
     )
 {
     this.varSetParser  = varSetParser;
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(varSetTextParser);
 }
Example #14
0
    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);
    }
Example #15
0
    public ChoiceNodeParser(
        IElementParser elementParser,
        IChoiceTimeLimitNodeParser timeLimitNodeParser,
        IChoiceDefaultNodeParser defaultNodeParser,
        IChoiceOptionNodeParser optionNodeParser
        )
    {
        this.elementParser = elementParser;

        Settings = ElementParserSettings.Normal(
            timeLimitNodeParser,
            defaultNodeParser,
            optionNodeParser
            );
    }
Example #16
0
 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
         );
 }
Example #17
0
 public ChoiceOptionEnabledWhenNodeParser(IElementParser elementParser, IBalloonTextParser textParser, IConditionParser conditionParser)
 {
     this.elementParser   = elementParser;
     this.conditionParser = conditionParser;
     Settings             = ElementParserSettings.Normal(textParser);
 }
Example #18
0
 public BackgroundScrollNodeParser(IElementParser elementParser, IWhenAttributeParser whenAttributeParser)
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(whenAttributeParser);
 }
Example #19
0
 public ChoiceTimeLimitNodeParser(IElementParser elementParser, IIntegerTextParser textParser)
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(textParser);
 }
Example #20
0
 public ChoiceOptionIconNodeParser(IElementParser elementParser, INameTextParser nameTextParser)
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(nameTextParser);
 }
Example #21
0
 public GenericTextNodeParserBase(IElementParser elementParser, ITextParser textParser)
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(textParser);
 }
Example #22
0
 public ChoiceRandomOrderNodeParser(IElementParser elementParser)
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal();
 }
Example #23
0
 public ChoiceDefaultNodeParser(IElementParser elementParser, INameTextParser textParser)
 {
     this.elementParser = elementParser;
     Settings           = ElementParserSettings.Normal(textParser);
 }