コード例 #1
0
        public void IncremementSequenceValue()
        {
            var sequenceManager = new SequenceManager(transaction);

            ISequence sequence = null;
            Assert.DoesNotThrow(() => sequence = sequenceManager.GetSequence(testSequenceName));
            Assert.IsNotNull(sequence);

            SqlNumber currentValue = SqlNumber.Null;
            Assert.DoesNotThrow(() => currentValue = sequence.NextValue());
            Assert.IsNotNull(currentValue);
            Assert.AreEqual(new SqlNumber(1), currentValue);
        }