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