Exemple #1
0
            public void ShouldReturnNewSessionOptions()
            {
                var options1 = ConfigBuilders.BuildSessionConfig(o => o.WithDatabase("neo4j"));
                var options2 = ConfigBuilders.BuildSessionConfig(o => o.WithDatabase("system"));

                options1.Database.Should().Be("neo4j");
                options2.Database.Should().Be("system");

                // When I reset to another value
                options1.Database = "foo";
                options1.Database.Should().Be("foo");
                options2.Database.Should().Be("system");
            }
Exemple #2
0
            public void ShouldReturnNewTxOptions()
            {
                var options1 = ConfigBuilders.BuildTransactionConfig(o => o.WithTimeout(TimeSpan.FromSeconds(5)));
                var options2 = ConfigBuilders.BuildTransactionConfig(o => o.WithTimeout(TimeSpan.FromSeconds(30)));

                options1.Timeout.Should().Be(TimeSpan.FromSeconds(5));
                options2.Timeout.Should().Be(TimeSpan.FromSeconds(30));

                // When I reset to another value
                options1.Timeout = TimeSpan.FromMinutes(1);
                options1.Timeout.Should().Be(TimeSpan.FromMinutes(1));
                options2.Timeout.Should().Be(TimeSpan.FromSeconds(30));
            }
Exemple #3
0
            public void ShouldReturnEmptySessionOptionsWhenBuilderIsNull()
            {
                var options = ConfigBuilders.BuildSessionConfig(null);

                options.Should().Be(SessionConfig.Default);
            }
Exemple #4
0
            public void ShouldReturnEmptyTxOptionsWhenBuilderIsNull()
            {
                var options = ConfigBuilders.BuildTransactionConfig(null);

                options.Should().Be(TransactionConfig.Default);
            }