Ejemplo n.º 1
0
        public static FakeBrowser WithButton(FakeButton button)
        {
            var browser = new FakeBrowser();

            browser.button = button;
            return(browser);
        }
Ejemplo n.º 2
0
        public void RunnerCanPressAddProject()
        {
            var input = new[] { "press AddProject" };
            var mock  = new Mockery();


            var button  = new FakeButton();
            var browser = FakeBrowser.WithButton(button);

            var runner = new AcceptanceRunner(input);

            runner.Run(browser);

            Assert.IsTrue(runner.Results["press AddProject"]);
            Assert.IsTrue(button.clickCalled);

            mock.VerifyAllExpectationsHaveBeenMet();
        }