Ejemplo n.º 1
0
        public void RedirectsToIndex_True()
        {
            MangoController mangoController = new MangoController();

            var actionResult = mangoController.Index() as ViewResult;

            Assert.AreEqual("Index", actionResult.ViewName);
        }
Ejemplo n.º 2
0
        public MangoManager(Gtk.Action toolbarIcon,
                            IUnitOfWorkFactory unitOfWorkFactory,
                            IEmployeeService employeeService,
                            IUserService userService,
                            INavigationManager navigation,
                            BaseParametersProvider parameters)
        {
            this.toolbarIcon       = toolbarIcon;
            this.unitOfWorkFactory = unitOfWorkFactory ?? throw new ArgumentNullException(nameof(unitOfWorkFactory));
            this.employeeService   = employeeService ?? throw new ArgumentNullException(nameof(employeeService));
            this.userService       = userService ?? throw new ArgumentNullException(nameof(userService));
            this.navigation        = navigation ?? throw new ArgumentNullException(nameof(navigation));
            _mangoController       = new MangoController(parameters.VpbxApiKey, parameters.VpbxApiSalt);

            timer = GLib.Timeout.Add(1000, new GLib.TimeoutHandler(HandleTimeoutHandler));
            toolbarIcon.Activated += ToolbarIcon_Activated;
            var userId = this.userService.CurrentUserId;

            NotifyConfiguration.Instance.BatchSubscribe(OnUserChanged).IfEntity <Employee>()
            .AndWhere(x => x.User != null && x.User.Id == userId);
        }
Ejemplo n.º 3
0
 public PhonebookHostedService(MangoController mangoController, CallsHostedService callsService)
 {
     _mangoController = mangoController ?? throw new ArgumentNullException(nameof(mangoController));
     _callsService    = callsService ?? throw new ArgumentNullException(nameof(callsService));
 }