예제 #1
0
        public void Sqlite_SnapshotStoreSettings_default_should_contain_default_config()
        {
            var config   = SqlitePersistence.Get(Sys).DefaultSnapshotConfig;
            var settings = new SnapshotStoreSettings(config);

            // values should be correct
            settings.ConnectionString.Should().Be(string.Empty);
            settings.ConnectionStringName.Should().Be(string.Empty);
            settings.ConnectionTimeout.Should().Equals(TimeSpan.FromSeconds(30));
            settings.SchemaName.Should().BeNull();
            settings.TableName.Should().Equals("snapshot");
            settings.AutoInitialize.Should().BeFalse();
            settings.DefaultSerializer.Should().BeNull();
            settings.FullTableName.Should().Equals(settings.TableName);

            // values should reflect configuration
            settings.ConnectionString.Should().Equals(config.GetString("connection-string"));
            settings.ConnectionStringName.Should().Equals(config.GetString("connection-string-name"));
            settings.ConnectionTimeout.Should().Equals(config.GetTimeSpan("connection-timeout"));
            settings.SchemaName.Should().Equals(config.GetString("schema-name", null));
            settings.TableName.Should().Equals(config.GetString("table-name"));
            settings.AutoInitialize.Should().Equals(config.GetBoolean("auto-initialize"));
            settings.DefaultSerializer.Should().Equals(config.GetString("serializer", null));
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlSnapshotStore"/> class.
 /// </summary>
 /// <param name="config">The configuration used to configure the snapshot store.</param>
 protected SqlSnapshotStore(Config config)
 {
     _actorSystem = Context.System.AsInstanceOf <ExtendedActorSystem>();
     _settings    = new SnapshotStoreSettings(config);
     _pendingRequestsCancellation = new CancellationTokenSource();
 }
예제 #3
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="config">TBD</param>
 protected SqlSnapshotStore(Config config)
 {
     _settings = new SnapshotStoreSettings(config);
     _pendingRequestsCancellation = new CancellationTokenSource();
 }
예제 #4
0
 protected SqlSnapshotStore(Config config)
 {
     _settings = new SnapshotStoreSettings(config);
     _pendingRequestsCancellation = new CancellationTokenSource();
 }