Пример #1
0
        public void CalculatorClearButtonResetsValueToZero()
        {
            // Make a new calculator controller
            // Enter a non-zero number
            // Click the clear button
            // Assert GetOutput() is equal to "0"

            DirkGentlyCalculatorController calc1 = new DirkGentlyCalculatorController();

            calc1.AcceptCharacter('1');
            Assert.That(calc1.GetOutput(), Is.EqualTo("1"));
            calc1.AcceptCharacter('2');
            Assert.That(calc1.GetOutput(), Is.EqualTo("12"));
            calc1.AcceptCharacter('c');
            Assert.That(calc1.GetOutput(), Is.EqualTo("0"));
        }
Пример #2
0
 public void BeforeEachTest()
 {
     Controller.AcceptCharacter('c');
 }