public static FakeBrowser WithButton(FakeButton button)
        {
            var browser = new FakeBrowser();

            browser.button = button;
            return(browser);
        }
Exemple #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();
        }