public void InputTest()
        {
            var calc = new Calculater();

            var result = calc.Calculate("1234567890N");

            Assert.AreEqual(-1234567890, result);

            calc.Close();
        }
        public void TestOpenClose()
        {
            var calc = new Calculater();

            Assert.NotNull(Process.GetProcesses().FirstOrDefault(p => p.ProcessName == "Calculator"));

            calc.Close();
            Thread.Sleep(1000); // wait a bit to ensure that Calculator is closed

            Assert.Null(Process.GetProcesses().FirstOrDefault(p => p.ProcessName == "Calculator"));
        }
Example #3
0
 public void Cleanup()
 {
     _calculater.Close();
 }