public void AddCharTest() { SimpleCalculatorServiceViewModel sp = new SimpleCalculatorServiceViewModel(); sp.AllCleaning (); string str = "6"; sp.AddChar (str); str = "."; sp.AddChar (str); str = "."; sp.AddChar (str); str = "8"; sp.AddChar (str); Assert.AreEqual ("6.8", sp.DisplayText); }
public void OperationAddTest() { SimpleCalculatorServiceViewModel sp = new SimpleCalculatorServiceViewModel(); string str = "+"; sp.AllCleaning (); sp.AddChar ("9"); sp.OperationAdd (str); Assert.AreEqual ("+", SimpleCalculatorServiceViewModel.s_Operation); }