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