public void constructorTest() { Trader t2 = new Trader("Player2", 1500); Assert.AreEqual(t2.getName(), "Player2"); Assert.AreEqual(t2.getBalance(), 1500); }
public void balanceAccessorModifierTest() { Trader t = new Trader(); t.setBalance(1050); Assert.AreEqual(t.getBalance(), 1050); }
public void payTest() { Trader t = new Trader("Player1", 1500); t.pay(111); Assert.AreEqual(t.getBalance(), 1500 - 111); }
public void receiveTest() { Trader t = new Trader("Player1", 1500); t.receive(55); Assert.AreEqual(t.getBalance(), 1555); }