public void Setup()
 {
     _userInterface  = Substitute.For <IUserInterface>();
     _output         = Substitute.For <IOutput>();
     _timer          = new Timer();
     _display        = new Display(_output);
     _powerTube      = new PowerTube(_output);
     _cookController = new CookController(_timer, _display, _powerTube, _userInterface);
 }
        public void Setup()
        {
            _timer  = new Timer();
            _output = new Output();

            _display   = Substitute.For <IDisplay>();
            _powerTube = Substitute.For <IPowerTube>();
            _uI        = Substitute.For <IUserInterface>();
            _cookC     = new CookController(_timer, _display, _powerTube, _uI);
            _sW        = new StringWriter();
            Console.SetOut(_sW);
        }
Esempio n. 3
0
        public void Setup()
        {
            light  = Substitute.For <ILight>();
            output = Substitute.For <IOutput>();

            sut_powerButton = new Button();
            sut_startButton = new Button();
            sut_timeButton  = new Button();
            sut_door        = new Door();
            _display        = new Display(output);
            _timer          = new Timer();
            _powerTube      = new PowerTube(output);

            _cookController = new CookController(_timer, _display, _powerTube);
            _UI             = new UserInterface(sut_powerButton, sut_timeButton, sut_startButton, sut_door, _display, light, _cookController);

            // Opretter den doublete association mellem CookController og UI
            _cookController.UI = _UI;
        }
Esempio n. 4
0
 public void Setup()
 {
     //Create Substitute
     output = Substitute.For <IOutput>();
     //Create instances:
     startCancelButton = new Button();
     powerButton       = new Button();
     timeButton        = new Button();
     door      = new Door();
     powerTube = new PowerTube(output);
     timer     = new Timer();
     display   = new Display(output);
     light     = new Light(output);
     //Assemble instances to cookController
     cookController = new CookController(timer, display, powerTube);
     //Assemble instances to UI
     ui = new UserInterface(powerButton, timeButton, startCancelButton, door, display, light, cookController);
     cookController.UI = ui;
 }
        public void Setup()
        {
            output = Substitute.For <IOutput>();

            sut_Door        = new Door();
            sut_powerButton = new Button();
            sut_startButton = new Button();
            sut_timeButton  = new Button();

            _light     = new Light(output);
            _display   = new Display(output);
            _powerTube = new PowerTube(output);
            _timer     = new Timer();

            _cookController = new CookController(_timer, _display, _powerTube);
            _userInterface  =
                new UserInterface(sut_powerButton, sut_timeButton, sut_startButton, sut_Door, _display, _light, _cookController);

            // Implementerer dobbelt association:
            _cookController.UI = _userInterface;
        }
        public void Setup()
        {
            door   = Substitute.For <IDoor>();
            light  = Substitute.For <ILight>();
            output = Substitute.For <IOutput>();

            startButton = new Button();
            timeButton  = new Button();
            powerButton = new Button();

            powerTube = new PowerTube(output);
            display   = new Display(output);
            timer     = new Timer();

            cookController = new CookController(timer, display, powerTube);

            userInterface =
                new UserInterface(powerButton, timeButton, startButton, door, display, light, cookController);

            // Implementerer dobbelt association:
            cookController.UI = userInterface;
        }
        public void Setup()
        {
            sut_PowerButton       = new Button();
            sut_TimeButton        = new Button();
            sut_StartCancelButton = new Button();
            sut_Door = new Door();

            fakeOutput = Substitute.For <IOutput>();

            display       = new Display(fakeOutput);
            timer         = new Timer();
            fakePowerTube = Substitute.For <IPowerTube>();


            cookController = new CookController(timer, display, fakePowerTube);
            light          = new Light(fakeOutput);

            userInterface = new UserInterface(sut_PowerButton, sut_TimeButton,
                                              sut_StartCancelButton, sut_Door, display,
                                              light, cookController);

            cookController.UI = userInterface;
        }
Esempio n. 8
0
        public void Setup()
        {
            _fakePowerTube = Substitute.For <IPowerTube>();
            _fakeDisplay   = Substitute.For <IDisplay>();
            _fakeLight     = Substitute.For <ILight>();

            _startCancelBtn = new Button();
            _timeBtn        = new Button();
            _powerBtn       = new Button();
            _door           = new Door();
            _timer          = new Timer();
            _cookController = new CookController(_timer, _fakeDisplay, _fakePowerTube);

            _userInterface = new UserInterface(_powerBtn,
                                               _timeBtn,
                                               _startCancelBtn,
                                               _door,
                                               _fakeDisplay,
                                               _fakeLight,
                                               _cookController);

            // Completing double association
            _cookController.UI = _userInterface;
        }