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); } }
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(); } }