Пример #1
0
        public TaskAdminWidget()
        {
            Title = "Task Administration";

            var viewModel = GetInstance<TasksViewModel>();

			controller = NewController<TasksController>();
            controller.Start();

            //View = new TaskFrontPage();
            View = new TasksView { DataContext = viewModel };

            viewModel.SaveChanges.AfterExecute += ToggleSettings;
        }
Пример #2
0
        public void SetUp()
        {
            _viewModel = new TasksViewModel();

            _taskDefinitionRepositoryMock = new Mock<IRepository<TaskDefinition>>();
            _taskConfigurationRepositoryMock = new Mock<IRepository<TaskConfiguration>>();
            _domainModelPersisterMock = new Mock<IPersistDomainModels<TaskConfiguration>>();
            _loadingNotifierMock = new Mock<IProgressbar>();
            _refreshNotifierMock = new Mock<ITimer>();

            _controller = new TasksController(_viewModel,
                                              _taskDefinitionRepositoryMock.Object,
                                              _taskConfigurationRepositoryMock.Object,
                                              _domainModelPersisterMock.Object,
                                              new NoUIInvokation(),
                                              _loadingNotifierMock.Object,
                                              new NoBackgroundWorkerInvocation<IEnumerable<TaskConfiguration>>());
        }