Пример #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);
        }