Exemplo n.º 1
0
 public void BeAbleToBuildTheSchema()
 {
     try
     {
         _envConfig.BuildSchema();
     }
     catch (Exception e)
     {
         Assert.Fail(e.ToString());
     }
 }
Exemplo 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();
        }