public void Setup() { this.mocks = new MockRepository(); this.mockImpl = this.mocks.StrictMock <ISqlImpl>(); // Creating a SqlConnection will cause a ISqlImpl to be created. // Inject the mock ISqlImpl into the SqlConnection through the // IoC container. Dependencies.Container.RegisterInstance <ISqlImpl>(this.mockImpl); this.sql = Dependencies.Container.Resolve <SqlConnection>(); }
public void Setup() { this.mocks = new MockRepository(); this.mockImpl = this.mocks.StrictMock<ISqlImpl>(); // Creating a SqlConnection will cause a ISqlImpl to be created. // Inject the mock ISqlImpl into the SqlConnection through the // IoC container. Dependencies.Container.RegisterInstance<ISqlImpl>(this.mockImpl); this.sql = Dependencies.Container.Resolve<SqlConnection>(); }
public Parser(ISqlImpl sqlImpl) { this.SqlImplementation = sqlImpl; this.Scanner = new Scanner(); this.Tracer = new Tracer("SqlParser", "SQL parser for ESENT", "SQL parser"); }