public void GetEnvironmentConfiguration()
        {
            _fakeDbConfig = Isolate.Fake.Instance<IDatabaseConfig>();
            var fakeConn = Isolate.Fake.Instance<IDbConnection>();
            Isolate.WhenCalled(() => _fakeDbConfig.GetConnection()).WillReturn(fakeConn);

            var fakeConfig = Isolate.Fake.Instance<Configuration>();
            Isolate.WhenCalled(() => fakeConfig.BuildSessionFactory()).ReturnRecursiveFake();
            _envConfig = new EnvironmentConfiguration(TestEnv, fakeConfig, _fakeDbConfig);

            Isolate.WhenCalled(() => _envConfig.BuildSchema(fakeConn)).WithExactArguments().IgnoreCall();
        }
Esempio n. 2
0
        public void GetEnvironmentConfiguration()
        {
            _fakeDbConfig = Isolate.Fake.Instance <IDatabaseConfig>();
            var fakeConn = Isolate.Fake.Instance <IDbConnection>();

            Isolate.WhenCalled(() => _fakeDbConfig.GetConnection()).WillReturn(fakeConn);

            var fakeConfig = Isolate.Fake.Instance <Configuration>();

            Isolate.WhenCalled(() => fakeConfig.BuildSessionFactory()).ReturnRecursiveFake();
            _envConfig = new EnvironmentConfiguration(TestEnv, fakeConfig, _fakeDbConfig);

            Isolate.WhenCalled(() => _envConfig.BuildSchema(fakeConn)).WithExactArguments().IgnoreCall();
        }
Esempio n. 3
0
 public void BuildSchema()
 {
     BuildSchema(_databaseConfig.GetConnection());
 }