Example #1
0
 // Stores the Calculator's current value in memory
 private void btnMS_Click(object sender, EventArgs e)
 {
     if (!newNumber)
     {
         MemoryCalculator memCalc = new MemoryCalculator();
         memCalc.MemmoryStore(firstNumber);
         newNumber = true;
         isDecimal = false;
     }
 }
Example #2
0
 // Recall memory
 private void btnMR_Click(object sender, EventArgs e)
 {
     if (!newNumber)
     {
         MemoryCalculator memCalc = new MemoryCalculator();
         firstNumber     = memCalc.MemoryRecall();
         newNumber       = true;
         isDecimal       = false;
         lblDisplay.Text = memCalc.ToString();
     }
 }
Example #3
0
 public void BeforeEachTest()
 {
     //Running code before and after each test
      Console.WriteLine("Before {0}", TestContext.CurrentContext.Test.Name);
      sut = new MemoryCalculator();
 }
Example #4
0
 public void AfterEachTest()
 {
     //Running code before and after each test
      Console.WriteLine("After {0}", TestContext.CurrentContext.Test.Name);
      sut = null;
 }