示例#1
0
        public void constructorTest()
        {
            Trader t2 = new Trader("Player2", 1500);

            Assert.AreEqual(t2.getName(), "Player2");
            Assert.AreEqual(t2.getBalance(), 1500);
        }
示例#2
0
        public void balanceAccessorModifierTest()
        {
            Trader t = new Trader();

            t.setBalance(1050);
            Assert.AreEqual(t.getBalance(), 1050);
        }
示例#3
0
        public void constructorTest()
        {          
            Trader t2 = new Trader("Player2", 1500);

            Assert.AreEqual(t2.getName(), "Player2");
            Assert.AreEqual(t2.getBalance(), 1500);
        }
示例#4
0
        public void balanceAccessorModifierTest()
        {
            Trader t = new Trader();
            t.setBalance(1050);
            Assert.AreEqual(t.getBalance(), 1050);

        }
示例#5
0
        public void payTest()
        {
            Trader t = new Trader("Player1", 1500);

            t.pay(111);

            Assert.AreEqual(t.getBalance(), 1500 - 111);
        }
示例#6
0
        public void receiveTest()
        {
            Trader t = new Trader("Player1", 1500);

            t.receive(55);

            Assert.AreEqual(t.getBalance(), 1555);
        }
示例#7
0
        public void payTest()
        {
            Trader t = new Trader("Player1", 1500);

            t.pay(111);

            Assert.AreEqual(t.getBalance(), 1500 - 111);
        }
示例#8
0
        public void receiveTest()
        {
            Trader t = new Trader("Player1", 1500);

            t.receive(55);

            Assert.AreEqual(t.getBalance(), 1555);
        }