Skip to content
Permalink
master
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 BoDi;
using System;
using TechTalk.SpecFlow;
namespace TestExample
{
[Binding]
public class ConnectionSupport
{
private readonly IObjectContainer objectContainer;
public ConnectionSupport(IObjectContainer objectContainer)
{
this.objectContainer = objectContainer;
}
[BeforeScenario]
public void InitializeConnection()
{
var sqlConnectionString = Environment.GetEnvironmentVariable("TabularAcceptanceTestSqlConnectionString");
var analysisServicersConnectionString = Environment.GetEnvironmentVariable("TabularAcceptanceTestAnalysisServicesConnectionString");
var tabularHelper = new TabularHelper(analysisServicersConnectionString);
var sqlHelper = new SqlHelper(sqlConnectionString);
objectContainer.RegisterInstanceAs<ITabularHelper>(tabularHelper);
objectContainer.RegisterInstanceAs<ISqlHelper>(sqlHelper);
}
}
}