Пример #1
0
        public DatabaseInitializeTests(SqliteDatabaseFixture databaseFixture, ITestOutputHelper output)
        {
            _databaseFixture = databaseFixture;
            _objectProvider  = _databaseFixture.ObjectProvider as RelationalObjectStore;
            databaseFixture.UseResultManager = false;

            FieldInfo fieldInfo = typeof(DataBaseProvider).GetTypeInfo().GetField("_getCommand", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Static);

            _oldGetCommand = fieldInfo.GetValue(null) as Func <DbCommand>;
            Func <DbCommand> getCommand = () => {
                return(new Command(new SqliteCommand(), this));
            };

            fieldInfo.SetValue(null, getCommand);
        }
Пример #2
0
 public SqliteTests(SqliteDatabaseFixture databaseFixture, ITestOutputHelper output) :
     base(databaseFixture, output)
 {
     databaseFixture.BeginTransaction();
     _databaseFixture = databaseFixture;
 }