Beispiel #1
0
        public void TryEnterReturnsTrueWhenUnlocked()
        {
            var gate = new AccessGate {
                IsLocked = false
            };

            gate.TryEnter().ShouldBeTrue();
        }
Beispiel #2
0
        public void TryEnterReturnsFalseWhenLocked()
        {
            var gate = new AccessGate {
                IsLocked = true
            };

            gate.TryEnter().ShouldBeFalse();
        }