Example #1
0
 public void TestUniverseConqueror()
 {
     var conqueror = new UniverseConqueror();
     Assert.AreEqual(false, conqueror.AmIInCharge());
     conqueror.Go();
     Assert.AreEqual(true, conqueror.AmIInCharge());
 }
Example #2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Console.WriteLine("This line of text is designed to conflict with Alistair's other branch.");
            Console.WriteLine("Alistair inserted this line as part of an experiment.");
            Console.WriteLine("This is a test.  This is only a test.  I repeat, this is a test!");
            var baseObj = new Base();
            var derivedObj = new Derived();
            Console.WriteLine("Base.Method() = {0}, but Derived.Method() = {1}.", baseObj.Method(), derivedObj.Method());
            var acct = new UnitTestingExamples.Library.BankAccount();
            acct.Deposit(1000000.00);
            acct.Withdraw(999999.99);
            Console.WriteLine("Account balance = ${0}.", acct.Balance);
            Console.WriteLine("(Now you know why banks don't use floating point arithmetic!)");

            var weapon = new UniverseConqueror();
            weapon.Go();
        }
Example #3
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Console.WriteLine("This line of text is designed to conflict with Alistair's other branch.");
            Console.WriteLine("Alistair inserted this line as part of an experiment.");
            Console.WriteLine("This is a test.  This is only a test.  I repeat, this is a test!");
            var baseObj    = new Base();
            var derivedObj = new Derived();

            Console.WriteLine("Base.Method() = {0}, but Derived.Method() = {1}.", baseObj.Method(), derivedObj.Method());
            var acct = new UnitTestingExamples.Library.BankAccount();

            acct.Deposit(1000000.00);
            acct.Withdraw(999999.99);
            Console.WriteLine("Account balance = ${0}.", acct.Balance);
            Console.WriteLine("(Now you know why banks don't use floating point arithmetic!)");

            var weapon = new UniverseConqueror();

            weapon.Go();
        }