示例#1
0
        public void MultiplyThreeAndThree()
        {
            // arrange
            var view = new StubView();
            var sut  = new Presenter(view);

            // act
            sut.NumberButtonPressed("3");
            sut.OperatorButtonClick("x");
            sut.NumberButtonPressed("3");
            sut.OperatorButtonClick("+ / =");

            // assert
            Assert.Equal("9", view.ScreenDisplay);
        }
示例#2
0
        public void SumTwoAndTwo()
        {
            // arrange
            var view = new StubView();
            var sut  = new Presenter(view);

            // act
            sut.NumberButtonPressed("2");
            sut.OperatorButtonClick("+ / =");
            sut.NumberButtonPressed("2");
            sut.OperatorButtonClick("+ / =");

            // assert
            Assert.Equal("4", view.ScreenDisplay);
        }