Example #1
0
        public void RunClassTest()
        {
            Console.WriteLine("In test");
            ClassEggbox eggs = new ClassEggbox(12);

            AddEggs(eggs);
            Assert.AreEqual(24, eggs.Count);
        }
Example #2
0
 public void WhenAllocation()
 {
     Console.WriteLine("In test");
     {
         StructEggbox eggs = new StructEggbox(12);
         AddEggs(eggs);
         Assert.AreEqual(12, eggs.Count);
     }
     {
         ClassEggbox eggs = new ClassEggbox(12);
         AddEggs(eggs);
         Assert.AreEqual(24, eggs.Count);
     }
 }
Example #3
0
 public void WhenIamCalled3(bool flag)
 {
     Console.WriteLine("I am in the block");
     if (flag)
     {
         Console.WriteLine("Flag is (" + flag + ")");
         ClassEggbox eggs = new ClassEggbox(12);
         AddEggs((RunningTotal)eggs);
         Console.WriteLine("Count (" + ((RunningTotal)eggs).Count + ")");
     }
     else if (!flag)
     {
         StructEggbox eggs2 = new StructEggbox(24);
         AddEggs(eggs2);
     }
 }