Esempio n. 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;
     }
 }
Esempio n. 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();
     }
 }
Esempio n. 3
0
 public void BeforeEachTest()
 {
     //Running code before and after each test
      Console.WriteLine("Before {0}", TestContext.CurrentContext.Test.Name);
      sut = new MemoryCalculator();
 }
Esempio n. 4
0
 public void AfterEachTest()
 {
     //Running code before and after each test
      Console.WriteLine("After {0}", TestContext.CurrentContext.Test.Name);
      sut = null;
 }