Пример #1
0
        protected override void Describe(SchemaBuilder builder)
        {
            base.Describe(builder);

            var indentationExample = @"
Feature: Cucumber stock keeping
Scenario: eat 5 out of 20
  Given there are 20 cucumbers
  When I eat 5 cucumbers
  Then I should have 15 cucumbers

Scenario: PyString
  Given the following text
  """"""
  Some text
  """"""

Scenario Outline: eating
  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |    12 |   5 |    7 |
    |    20 |   5 |   15 |
";

            builder
            .Category("Indentation rules")
            .ItemFor(key => key.ExampleIndentSize, indentationExample)
            .ItemFor(key => key.PyStringIndentSize, indentationExample)
            .ItemFor(key => key.ScenarioIndentSize, indentationExample)
            .ItemFor(key => key.StepIndentSize, indentationExample)
            .ItemFor(key => key.AndStepIndentSize, indentationExample)
            .ItemFor(key => key.TableIndentSize, indentationExample)
            .ItemFor(key => key.SmallTableIndent, indentationExample)
            .EndCategory();
            builder
            .Category("Blank lines rules")
            .ItemFor(key => key.BlankLinesBeforeExamples, indentationExample)
            .ItemFor(key => key.BlankLinesBeforeScenario, indentationExample)
            .EndCategory();
        }
Пример #2
0
        protected override void Describe(SchemaBuilder builder)
        {
            base.Describe(builder);

            builder
            .Category("Brace rules")

            .ItemFor(
                key => key.BraceStyle,
                "Shader \"Unlit/NewUnlitShader\"\n{\n    Properties\n    {\n        _MainTex (\"Texture\", 2D) = \"white\" {}\n    }\n    SubShader\n    {\n        Tags { \"RenderType\"=\"Opaque\" }\n        LOD 100\n\n        Pass\n        {\n\n        }\n    }\n}")
            .EndCategory();
        }