Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
using NUnit.Framework;
using System;
using System.Data;
using TechTalk.SpecFlow;
using TechTalk.SpecFlow.Assist;
namespace TestExample
public class AverageAgeSteps
private ISqlHelper _sqlHelper;
private ITabularHelper _tabularHelper;
DataTable dataTable;
public AverageAgeSteps(ISqlHelper sqlHelper, ITabularHelper tabularHelper)
this._sqlHelper = sqlHelper;
this._tabularHelper = tabularHelper;
[Given(@"I have persons:")]
public void GivenIHavePersons(Table table)
[When(@"I query for average age")]
public void WhenIQueryForAverageAge()
var query = @"EVALUATE ROW(""Average Age"", Person[Average Age])";
this.dataTable = _tabularHelper.GetDataTable(query);
[Then(@"I expect the result to be:")]
public void ThenIExpectTheResultToBe(Table table)
int index = 0;
var expectedRows = table.CreateSet<AverageAge>();
foreach (AverageAge expectedRow in expectedRows)
DataRow row = this.dataTable.Rows[index++];
Assert.AreEqual(expectedRow.Average, row["[Average Age]"]);
class AverageAge
public double Average { get; set; }