public void TestPass() { Turnstile t = new Turnstile(); t.Pass(); //Turnstile t1 = new Turnstile(); Assert.IsTrue(t.Alarm()); Assert.IsTrue(t.Locked()); }
public void TestCancelAlarm() { Turnstile t = new Turnstile(); t.Pass(); t.Coin(); Assert.IsFalse(t.Alarm()); Assert.IsFalse(t.Locked()); Assert.AreEqual(1, t.Coins); Assert.AreEqual(0, t.Refunds); }
public void TestCoinAndPass() { Turnstile t = new Turnstile(); t.Coin(); t.Pass(); //Turnstile t1 = new Turnstile(); Assert.IsTrue(t.Locked()); Assert.IsFalse(t.Alarm()); //Assert.AreEqual(1, t1.Coins, "coins"); }
public void TestTwoOperations() { Turnstile t = new Turnstile(); t.Coin(); t.Pass(); t.Coin(); //Turnstile t1 = new Turnstile(); Assert.IsFalse(t.Locked()); Assert.AreEqual(2, t.Coins); t.Pass(); Assert.IsTrue(t.Locked()); }