public void AddTask() { ITaskUnitOfWork taskUnitOfWork = new TaskUnitOfWorkTest(new TestTaskRepository(), null); TaskCommands taskCommands = new TaskCommands(taskUnitOfWork, new DateTimeTools.DateTimePT()); taskCommands.Add("Test1", "Details", 0, false); Assert.AreEqual((taskUnitOfWork.TaskRepository as TestTaskRepository).Element.Elements.Count, 1); }
public TaskBoardController(TaskBoardViewModel viewModel, IControllerServices controllerServices) : base(viewModel, controllerServices) { this._commands = new TaskCommands(controllerServices); this._createNewTaskCommand = this._commands.CreateNewTaskCommand; this._openTaskDetailsCommand = this._commands.OpenTaskDetailsCommand; this._whenTaskChangedObservable = this._taskboardDragDropHandler.WhenTaskChangedLane.Subscribe(this.HandleTaskLaneChange); }
public void AddTomatoByName() { var testTomatoRepository = new TomatoRepositoryTest(); var testTaskRepository = new TestTaskRepository(); ITaskUnitOfWork taskUnitOfWork = new TaskUnitOfWorkTest(testTaskRepository, testTomatoRepository); TaskCommands taskCommands = new TaskCommands(taskUnitOfWork, new DateTimeTools.DateTimePT()); Assert.IsTrue(testTaskRepository.Element.Elements.Count == 0); taskCommands.AddToTomato("XXX", "Details", 0); Assert.IsTrue(testTaskRepository.Element.Elements.Count == 1); Assert.IsTrue(testTaskRepository.Element.Elements[0].Tomatoes.Count > 0); }
public ShellController(ShellViewModel viewModel, IControllerServices controllerServices) : base(viewModel, controllerServices) { this._taskCommands = new TaskCommands(this.ControllerServices); this._activityCommands = new ActivityCommands(this.ControllerServices); this.ViewModel.OverlayViewModel = new OverlayViewModel(); this.ViewModel.NavigateInNavigatorCommand = this._taskCommands.NavigateInNavigatorCommand; this.ViewModel.CreateNewActivityCommand = this._activityCommands.CreateNewActivityCommand; this.ViewModel.CreateNewTaskCommand = this._taskCommands.CreateNewTaskCommand; this._headerMenuController = this.CreateChildController <HeaderMenuController>(); this.ViewModel.HeaderMenuViewModel = this._headerMenuController.ViewModel; this._contentBrowserController = this.CreateChildController <ContentBrowserController>(); this.ViewModel.ContentBrowserViewModel = this._contentBrowserController.ViewModel; }
public void AddTomatoById() { var testTomatoRepository = new TomatoRepositoryTest(); var testTaskRepository = new TestTaskRepository(); testTaskRepository.ElementsTeset.Add(new Domain.Element("core", "Details", CoreObjects.ElementType.TaskBag, null)); testTaskRepository.ElementsTeset.Add(new Domain.Element("jeden", "Details", CoreObjects.ElementType.Task, 0)); testTaskRepository.ElementsTeset.Add(new Domain.Element("dwa", "Details", CoreObjects.ElementType.Task, 0)); ITaskUnitOfWork taskUnitOfWork = new TaskUnitOfWorkTest(testTaskRepository, testTomatoRepository); TaskCommands taskCommands = new TaskCommands(taskUnitOfWork, new DateTimeTools.DateTimePT()); Assert.IsTrue(testTaskRepository.ElementsTeset[0].Tomatoes.Count == 0); taskCommands.AddToTomato(new List <int>() { 1, 2 }); Assert.IsTrue(testTaskRepository.ElementsTeset[0].Tomatoes.Count > 0); Assert.IsTrue(testTaskRepository.ElementsTeset[1].Tomatoes.Count > 0); }
private void Get_Command_ExecuteCode(object sender, EventArgs e) { switch (GetCommand(item)) { case ZATWIERDZ: taskCMD = TaskCommands.Zatwiedz; break; case WYSLIJ_INFORMACJE_DO_KLIENTA: taskCMD = TaskCommands.WyslijInfo; break; case WYSLIJ_INFORMACJE_I_ZAKONCZ_ZADANIE: taskCMD = TaskCommands.WyslijInfoIZakoncz; break; case ANULUJ: taskCMD = TaskCommands.Anuluj; break; default: taskCMD = TaskCommands.NotDefined; break; } }