public void ShiftValueTest()
        {
            variable.SetValue(-1);

            Assert.That(variable.GetValue(), Is.EqualTo(variable.Domain.OutsideScope));
            variable.ShiftValue();
            Assert.That(variable.GetValue(), Is.EqualTo(variable.Domain.OutsideScope));
            variable.SetValue(1);
            Assert.That(variable.GetValue(), Is.EqualTo(1));
            variable.ShiftValue();
            Assert.That(variable.GetValue(), Is.EqualTo(2));
            variable.ShiftValue();
            Assert.That(variable.GetValue(), Is.Zero);
            variable.ShiftValue();
            Assert.That(variable.GetValue(), Is.EqualTo(1));
        }
Exemple #2
0
        public void ShiftValueTest()
        {
            variable.SetValue(-1);

            Assert.AreEqual(variable.Domain.OutsideScope, variable.GetValue());
            variable.ShiftValue();
            Assert.AreEqual(variable.Domain.OutsideScope, variable.GetValue());
            variable.SetValue(1);
            Assert.AreEqual(1, variable.GetValue());
            variable.ShiftValue();
            Assert.AreEqual(2, variable.GetValue());
            variable.ShiftValue();
            Assert.AreEqual(0, variable.GetValue());
            variable.ShiftValue();
            Assert.AreEqual(1, variable.GetValue());
        }