public void TestTwoCoins() { Turnstile t=new Turnstile(); t.Coin(); t.Coin(); Turnstile t1=new Turnstile(); Assert.IsFalse(t1.Locked()); Assert.AreEqual(1,t1.Coins); Assert.AreEqual(1,t1.Refunds); Assert.IsFalse(t1.Alarm()); }
public void TestCoinAndPass() { Turnstile t=new Turnstile(); t.Coin(); t.Pass(); Turnstile t1=new Turnstile(); Assert.IsTrue(t1.Locked()); Assert.IsFalse(t1.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(t1.Locked()); Assert.AreEqual(2,t1.Coins); t.Pass(); Assert.IsTrue(t1.Locked()); }