Exemplo n.º 1
0
        public void Resume_Changes_Pause_Correctly_Without_Increment()
        {
            var uut = new SequenceNumber().Pause(false);

            Assert.AreEqual(0, uut);
            Assert.AreEqual(0, uut);
            uut.Resume(true);
            Assert.AreEqual(1, uut);
            Assert.AreEqual(2, uut);
            Assert.AreEqual(3, uut);
            uut.Pause(false);
            Assert.AreEqual(3, uut);
            Assert.AreEqual(3, uut);
            Assert.AreEqual(3, uut);
            uut.Resume(false);
            Assert.AreEqual(3, uut);
            Assert.AreEqual(4, uut);
            Assert.AreEqual(5, uut);
            uut.Pause(true);
            Assert.AreEqual(6, uut);
            Assert.AreEqual(6, uut);
            Assert.AreEqual(6, uut);
        }