コード例 #1
0
        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>();
        }
コード例 #2
0
        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>();
        }
コード例 #3
0
ファイル: Parser.cs プロジェクト: anthrax3/ManagedEsent
 public Parser(ISqlImpl sqlImpl)
 {
     this.SqlImplementation = sqlImpl;
     this.Scanner           = new Scanner();
     this.Tracer            = new Tracer("SqlParser", "SQL parser for ESENT", "SQL parser");
 }