Exemplo n.º 1
0
        public void EnsureConnectionByName()
        {
            var session = new DataSession("Tracker");
            session.Should().NotBeNull();
            session.Connection.Should().NotBeNull();
            session.Connection.State.Should().Be(ConnectionState.Closed);

            session.EnsureConnection();
            session.Connection.State.Should().Be(ConnectionState.Open);

            session.ReleaseConnection();
            session.Connection.State.Should().Be(ConnectionState.Closed);
        }
Exemplo n.º 2
0
        public void EnsureConnectionByName()
        {
            var session = new DataSession("Tracker");

            session.Should().NotBeNull();
            session.Connection.Should().NotBeNull();
            session.Connection.State.Should().Be(ConnectionState.Closed);

            session.EnsureConnection();
            session.Connection.State.Should().Be(ConnectionState.Open);

            session.ReleaseConnection();
            session.Connection.State.Should().Be(ConnectionState.Closed);
        }