Пример #1
0
        /// <summary>
        /// Converts the provided <see cref="SpecFlow.Examples"/> instance into an enumerable collection of <see cref="Augurk.Entities.ExampleSet"/> instances.
        /// </summary>
        /// <param name="examples">The <see cref="SpecFlow.Examples"/> instance that should be converted.</param>
        /// <returns>An enumerable collection of <see cref="Augurk.Entities.ExampleSet"/> instances.</returns>
        public static IEnumerable <ExampleSet> ConvertToExampleSets(this SpecFlow.Examples examples)
        {
            if (examples == null)
            {
                throw new ArgumentNullException("examples");
            }

            return(examples.ExampleSets.Select(exampleSet => exampleSet.ConvertToExampleSet()).ToArray());
        }
Пример #2
0
 public ScenarioOutline(string keyword, string title, string description, Tags tags, ScenarioSteps scenarioSteps, Examples examples) :
     base(keyword, title, description, tags, scenarioSteps)
 {
     Examples = examples;
 }
Пример #3
0
 public ScenarioOutline(string title, Tags tags, ScenarioSteps scenarioSteps, Examples examples)
     : base(title, tags, scenarioSteps)
 {
     Examples = examples;
 }
    // $ANTLR end "fileposition"


    // $ANTLR start "examples"
    // SpecFlowLangWalker.g:125:1: examples returns [Examples examples] : ^( EXAMPLES (exampleSet_= exampleSet )+ ) ;
    public Examples examples() // throws RecognitionException [1]
    {   
        Examples examples = default(Examples);

        ExampleSet exampleSet_ = default(ExampleSet);



            var exampleSets = new List<ExampleSet>();

        try 
    	{
            // SpecFlowLangWalker.g:132:5: ( ^( EXAMPLES (exampleSet_= exampleSet )+ ) )
            // SpecFlowLangWalker.g:132:9: ^( EXAMPLES (exampleSet_= exampleSet )+ )
            {
            	Match(input,EXAMPLES,FOLLOW_EXAMPLES_in_examples866); 

            	Match(input, Token.DOWN, null); 
            	// SpecFlowLangWalker.g:133:13: (exampleSet_= exampleSet )+
            	int cnt11 = 0;
            	do 
            	{
            	    int alt11 = 2;
            	    int LA11_0 = input.LA(1);

            	    if ( (LA11_0 == EXAMPLESET) )
            	    {
            	        alt11 = 1;
            	    }


            	    switch (alt11) 
            		{
            			case 1 :
            			    // SpecFlowLangWalker.g:133:14: exampleSet_= exampleSet
            			    {
            			    	PushFollow(FOLLOW_exampleSet_in_examples883);
            			    	exampleSet_ = exampleSet();
            			    	state.followingStackPointer--;

            			    	 exampleSets.Add(exampleSet_); 

            			    }
            			    break;

            			default:
            			    if ( cnt11 >= 1 ) goto loop11;
            		            EarlyExitException eee11 =
            		                new EarlyExitException(11, input);
            		            throw eee11;
            	    }
            	    cnt11++;
            	} while (true);

            	loop11:
            		;	// Stops C# compiler whinging that label 'loop11' has no statements


            	Match(input, Token.UP, null); 

            }


                examples =  new Examples(exampleSets.ToArray());

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return examples;
    }
Пример #5
0
 public ScenarioOutline(string keyword, string title, string description, Tags tags, ScenarioSteps scenarioSteps, Examples examples) : 
     base(keyword, title, description, tags, scenarioSteps)
 {
     Examples = examples;
 }