Exemple #1
0
        public void checkBankruptNegative()
        {
            Trader t = new Trader("Player1", -100);

            try
            {
                t.checkBankrupt();//exception should be thrown so should not run follwing line
                Assert.Fail();
            }
            catch (Exception ex)
            {
                Console.Write("Exception Thrown: " + ex.Message);
            }
        }
Exemple #2
0
        public void checkBankrupt()
        {
            Trader t = new Trader("Player1", 1500);

            try
            {
                t.checkBankrupt();//nothing should happen (no exception thrown)
            }
            catch (Exception ex)
            {
                Console.Write("Exception Thrown: " + ex.Message);
                Assert.Fail();
            }
        }
        public void checkBankrupt()
        {
            Trader t = new Trader("Player1", 1500);

            try
            {
                t.checkBankrupt();//nothing should happen (no exception thrown)
                
            }
            catch (Exception ex)
            {
                Console.Write("Exception Thrown: " + ex.Message);
                Assert.Fail();
            }

        }
        public void checkBankruptNegative()
        {
            Trader t = new Trader("Player1", -100);
            try
            {
                t.checkBankrupt();//exception should be thrown so should not run follwing line
                Assert.Fail();
            }
            catch (Exception ex)
            {
                Console.Write("Exception Thrown: " + ex.Message);
            }

        }