Ejemplo n.º 1
0
        public void SetNullTest(int original)
        {
            var nullValue = BinarySearchTreeHelper.SetNull(original);

            BinarySearchTreeHelper.IsNull(nullValue).Should().Be(true);
            BinarySearchTreeHelper.GetAddress(nullValue).Should().Be(original);
        }
Ejemplo n.º 2
0
        public void SetLockTest(int original)
        {
            BinarySearchTreeHelper.GetAddress(original).Should().Be(original);

            var locked = BinarySearchTreeHelper.SetLock(original);

            BinarySearchTreeHelper.IsLocked(locked).Should().Be(true);
            BinarySearchTreeHelper.GetAddress(locked).Should().Be(original);

            var unlocked = BinarySearchTreeHelper.SetUnlock(locked);

            BinarySearchTreeHelper.IsLocked(unlocked).Should().Be(false);
            unlocked.Should().Be(original);
        }