Esempio n. 1
0
        public void ThenUsingListOnStatementResultGives(Table table)
        {
            var records = new List <IRecord>();

            foreach (var row in table.Rows)
            {
                records.Add(new Record(row.Keys.ToList(), row.Values.Select(value => _parser.Parse(value)).ToArray()));
            }
            var resultCursor = ScenarioContext.Current.Get <IStatementResult>();

            TckUtil.AssertRecordsAreTheSame(resultCursor.ToList(), records);
        }
        public void WhenRunningParameterized(string statement, Table table)
        {
            table.RowCount.Should().Be(1);
            var dict = table.Rows[0].Keys.ToDictionary <string, string, object>(key => key,
                                                                                key => _parser.Parse(table.Rows[0][key]));

            var session = TckHooks.CreateSession();
            var result  = session.Run(statement, dict);

            ScenarioContext.Current.Set(result);
        }