Example #1
0
 public void GateDoesNotThrowWhenUnlocked()
 {
     var gate = new AccessGate {IsLocked = false};
     Should.NotThrow(() => gate.Enter());
 }
Example #2
0
 public void GateThrowsWhenLocked()
 {
     var gate = new AccessGate {IsLocked = true};
     Should.Throw<InvalidOperationException>(() => gate.Enter());
 }