Example #1
0
 public void TryEnterReturnsTrueWhenUnlocked()
 {
     var gate = new AccessGate {IsLocked = false};
     gate.TryEnter().ShouldBeTrue();
 }
Example #2
0
 public void TryEnterReturnsFalseWhenLocked()
 {
     var gate = new AccessGate {IsLocked = true};
     gate.TryEnter().ShouldBeFalse();
 }