コード例 #1
0
        public async Task Build_Success()
        {
            SqlServerStorageEngineBuilder builder = new SqlServerStorageEngineBuilder();

            await builder.Initialize(new ServiceCollection().BuildServiceProvider(), configuration);

            SqlServerLedger ledger = builder.Build(null);

            Assert.NotNull(ledger);
        }
コード例 #2
0
        public SqlServerLedgerTests()
        {
            SqlServerLedger engine = new SqlServerLedger(ConfigurationManager.GetSetting("sql_connection_string"), 1, TimeSpan.FromSeconds(10));
            engine.Initialize().Wait();

            SqlCommand command = engine.Connection.CreateCommand();
            command.CommandText = @"
                DELETE FROM [Openchain].[RecordMutations];
                DELETE FROM [Openchain].[Records];
                DELETE FROM [Openchain].[Transactions];
            ";

            command.ExecuteNonQuery();

            this.Engine = engine;
            this.Queries = engine;
            this.Indexes = engine;
        }
コード例 #3
0
        public SqlServerLedgerTests()
        {
            SqlServerLedger engine = new SqlServerLedger(ConfigurationManager.GetSetting("sql_connection_string"), 1, TimeSpan.FromSeconds(10));

            engine.Initialize().Wait();

            SqlCommand command = engine.Connection.CreateCommand();

            command.CommandText = @"
                DELETE FROM [Openchain].[RecordMutations];
                DELETE FROM [Openchain].[Records];
                DELETE FROM [Openchain].[Transactions];
            ";

            command.ExecuteNonQuery();

            this.Engine  = engine;
            this.Queries = engine;
            this.Indexes = engine;
        }