/// <summary> /// Initialize the test suite /// </summary> /// <param name="outputHelper">Allows the test to write data to stdout</param> public StartButtonControllerShould(ITestOutputHelper outputHelper) : base(outputHelper) { _mockModel = new Mock <IStartButtonModel>(); _mockView = new Mock <IStartButtonView>(); _dut = new StartButtonController(_mockModel.Object, _mockView.Object); _dut.Options = new StartButtonControllerOptions(); }
/// <summary> /// Initialize all the GameObjects and resources for the Timer superclass. /// </summary> protected void InitializeTimer() { gameData = GameObject.Find("Game Data").GetComponent <GameData>(); slider = GameObject.Find("Slider").GetComponent <Slider>(); sliderFill = GameObject.Find("Slider Fill").GetComponent <Image>(); gameplayController = GameObject.Find("Gameplay Controller").GetComponent <GameplayController>(); speechController = GameObject.Find("Speech Controller").GetComponent <SpeechController>(); startButtonController = GameObject.Find("Start Button Controller").GetComponent <StartButtonController>(); sceneTransitionController = GameObject.Find("Transition").GetComponent <SceneTransitionController>(); playerAnimationController = GameObject.Find("Player Animation Controller").GetComponent <PlayerAnimationController>(); countdownController = GameObject.Find("Countdown Controller").GetComponent <CountdownController>(); // Set the total time and bounded time timeMax = gameData.GetTimeTotal(); bound = gameData.GetBound() * timeMax; }
/// <summary> /// Build a controller with the currently specified requirements /// </summary> /// <returns>The newly constructed controller</returns> public IStartButtonController Build() { if (model == null) { throw new ArgumentNullException(nameof(model)); } if (view == null) { throw new ArgumentNullException(nameof(view)); } var controller = new StartButtonController(model, view); controller.Options = options; return(controller); }