public async Task Build_Success() { SqlServerStorageEngineBuilder builder = new SqlServerStorageEngineBuilder(); await builder.Initialize(new ServiceCollection().BuildServiceProvider(), configuration); SqlServerLedger ledger = builder.Build(null); Assert.NotNull(ledger); }
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; }