public void constructor_should_initialize_instance()
        {
            var serverSession = Mock.Of <ICoreServerSession>();
            var options       = new CoreSessionOptions();

            var result = new CoreSession(serverSession, options);

            result.Options.Should().BeSameAs(options);
            result.ServerSession.Should().BeSameAs(serverSession);
            result._disposed().Should().BeFalse();
        }
Exemplo n.º 2
0
        public void constructor_should_initialize_instance()
        {
            var cluster       = Mock.Of <ICluster>();
            var serverSession = Mock.Of <ICoreServerSession>();
            var options       = new CoreSessionOptions();

            var result = new CoreSession(cluster, serverSession, options);

            result.Cluster.Should().BeSameAs(cluster);
            result.CurrentTransaction.Should().BeNull();
            result.IsInTransaction.Should().BeFalse();
            result.Options.Should().BeSameAs(options);
            result.ServerSession.Should().BeSameAs(serverSession);
            result._disposed().Should().BeFalse();
        }
Exemplo n.º 3
0
        public void constructor_should_initialize_instance()
        {
            var cluster       = Mock.Of <ICluster>();
            var serverSession = Mock.Of <ICoreServerSession>();
            var options       = new CoreSessionOptions();

#pragma warning disable CS0618 // Type or member is obsolete
            var result = new CoreSession(cluster, serverSession, options);
#pragma warning restore CS0618 // Type or member is obsolete

            result.Cluster.Should().BeSameAs(cluster);
            result.CurrentTransaction.Should().BeNull();
            result.IsInTransaction.Should().BeFalse();
            result.Options.Should().BeSameAs(options);
            result.ServerSession.Should().BeSameAs(serverSession);
            result._disposed().Should().BeFalse();
            result._isCommitTransactionInProgress().Should().BeFalse();
        }