ADOUtils.Tests.DatabaseTest.TransactionManagement.Should_commit_only_when_explicitly_commit C# (CSharp) Method

Should_commit_only_when_explicitly_commit() private method

private Should_commit_only_when_explicitly_commit ( ) : void
return void
        public void Should_commit_only_when_explicitly_commit()
        {
            using(var tx = _target.BeginTransaction())
            {
                _target.Exec("INSERT INTO Tbl(IntValue) VALUES(1)");
                tx.Commit();
            }

            using(var tx = _target.BeginTransaction())
            {
                _target.Exec("INSERT INTO Tbl(IntValue) VALUES(2)");
                tx.Rollback();
            }

            using(_target.BeginTransaction())
            {
                _target.Exec("INSERT INTO Tbl(IntValue) VALUES(3)");
            }

            _target.Scalar<int>("SELECT SUM(IntValue) FROM Tbl").Should().Be.EqualTo(1);
        }