Ejemplo n.º 1
0
        public void StableObjectLessThanStableCounterNotSet()
        {
            var stableCounter            = 5;
            StableObject <bool> myObject = new StableObject <bool>(stableCounter, false);

            for (int i = 0; i < stableCounter - 1; i++)
            {
                myObject.SetValue(true);
            }
            var actualValue = myObject.ActualValue;

            Assert.AreEqual(false, actualValue);
        }
Ejemplo n.º 2
0
        public void StableObjectMoreStableCounterSet()
        {
            var stableCounter            = 5;
            StableObject <bool> myObject = new StableObject <bool>(stableCounter, false);

            for (int i = 0; i < 2 * stableCounter; i++)
            {
                myObject.SetValue(true);
            }
            var actualValue = myObject.ActualValue;

            Assert.AreEqual(true, actualValue);
        }