public CosmosEventStoreInitializer(
     IOptions <EventStoreClientOptions> options,
     ICosmosClientFactory clientFactory)
 {
     this.options       = options.Value;
     this.clientFactory = clientFactory;
 }
Exemplo n.º 2
0
        internal void Should_Default_ToCosmosEmulator()
        {
#pragma warning disable CS0618 // Type or member is obsolete
            var options = new EventStoreClientOptions();

            options.ConnectionString.Should().Be(EventStoreClientOptions.CosmosEmulatorConnectionString);
#pragma warning restore CS0618 // Type or member is obsolete
            options.AuthKey.Should().BeNull();
            options.Endpoint.Should().BeNull();
            options.Credential.Should().BeNull();
        }
Exemplo n.º 3
0
        internal void Should_UseAuthKeyAndEndpoint()
        {
            var options = new EventStoreClientOptions();

            options.UseCredentials("endpoint", "auth-key");

            options.AuthKey.Should().Be("auth-key");
            options.Endpoint.Should().Be("endpoint");
            options.Credential.Should().BeNull();
#pragma warning disable CS0618 // Type or member is obsolete
            options.ConnectionString.Should().BeNull();
#pragma warning restore CS0618 // Type or member is obsolete
        }
Exemplo n.º 4
0
        internal void Should_Set_ConnectionString()
        {
#pragma warning disable CS0618 // Type or member is obsolete
            var options = new EventStoreClientOptions
            {
                ConnectionString = "connection-string",
            };

            options.ConnectionString.Should().Be("connection-string");
#pragma warning restore CS0618 // Type or member is obsolete
            options.AuthKey.Should().BeNull();
            options.Endpoint.Should().BeNull();
            options.Credential.Should().BeNull();
        }