public void Initialize(ITopActionsButtonsView topActionsButtonsView, ITooltipController tooltipController) { this.topActionsButtonsView = topActionsButtonsView; this.tooltipController = tooltipController; topActionsButtonsView.OnChangeModeClicked += ChangeModeClicked; topActionsButtonsView.OnExtraClicked += ExtraClicked; topActionsButtonsView.OnTranslateClicked += TranslateClicked; topActionsButtonsView.OnRotateClicked += RotateClicked; topActionsButtonsView.OnScaleClicked += ScaleClicked; topActionsButtonsView.OnUndoClicked += UndoClicked; topActionsButtonsView.OnRedoClicked += RedoClicked; topActionsButtonsView.OnDuplicateClicked += DuplicateClicked; topActionsButtonsView.OnDeleteClicked += DeleteClicked; topActionsButtonsView.OnLogOutClicked += LogoutClicked; topActionsButtonsView.OnPointerExit += TooltipPointerExited; topActionsButtonsView.OnChangeCameraModePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnTranslatePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnRotatePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnScalePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnUndoPointerEnter += TooltipPointerEntered; topActionsButtonsView.OnRedoPointerEnter += TooltipPointerEntered; topActionsButtonsView.OnDuplicatePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnDeletePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnMoreActionsPointerEnter += TooltipPointerEntered; topActionsButtonsView.OnLogoutPointerEnter += TooltipPointerEntered; topActionsButtonsView.OnSnapModePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnSnapModeClicked += SnapModeClicked; extraActionsController = new ExtraActionsController(); topActionsButtonsView.ConfigureExtraActions(extraActionsController); extraActionsController.SetActive(false); }
public void Initialize(ITopActionsButtonsView topActionsButtonsView, ITooltipController tooltipController, IBuildModeConfirmationModalController buildModeConfirmationModalController) { this.topActionsButtonsView = topActionsButtonsView; this.tooltipController = tooltipController; this.buildModeConfirmationModalController = buildModeConfirmationModalController; topActionsButtonsView.OnChangeModeClicked += ChangeModeClicked; topActionsButtonsView.OnExtraClicked += ExtraClicked; topActionsButtonsView.OnTranslateClicked += TranslateClicked; topActionsButtonsView.OnRotateClicked += RotateClicked; topActionsButtonsView.OnScaleClicked += ScaleClicked; topActionsButtonsView.OnResetClicked += ResetClicked; topActionsButtonsView.OnDuplicateClicked += DuplicateClicked; topActionsButtonsView.OnDeleteClicked += DeleteClicked; topActionsButtonsView.OnLogOutClicked += ShowLogoutConfirmation; topActionsButtonsView.OnPointerExit += TooltipPointerExited; topActionsButtonsView.OnChangeCameraModePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnTranslatePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnRotatePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnScalePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnResetPointerEnter += TooltipPointerEntered; topActionsButtonsView.OnDuplicatePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnDeletePointerEnter += TooltipPointerEntered; topActionsButtonsView.OnMoreActionsPointerEnter += TooltipPointerEntered; topActionsButtonsView.OnLogoutPointerEnter += TooltipPointerEntered; buildModeConfirmationModalController.OnCancelExit += HideLogoutConfirmation; buildModeConfirmationModalController.OnConfirmExit += ConfirmLogout; extraActionsController = new ExtraActionsController(); topActionsButtonsView.ConfigureExtraActions(extraActionsController); extraActionsController.SetActive(false); }
public void ConfigureExtraActionsCorrectly() { // Arrange IExtraActionsController mockedExtraActionsController = Substitute.For <IExtraActionsController>(); topActionsButtonsView.extraActionsController = null; // Act topActionsButtonsView.ConfigureExtraActions(mockedExtraActionsController); // Assert Assert.AreEqual(mockedExtraActionsController, topActionsButtonsView.extraActionsController, "The extra actions controller does not match!"); mockedExtraActionsController.Received(1).Initialize(topActionsButtonsView.extraActionsView); }