Exemplo n.º 1
0
        public void CanAddTwoUserStories()
        {
            var backlog = new Backlog();
            backlog.Add(new BacklogItem("US1"));
            backlog.Add(new BacklogItem("US2"));

            var backlogItems = backlog.Items;

            CollectionAssert.AreEqual(new[] {
                                                new BacklogItem("US1"),
                                                new BacklogItem("US2")
                                            },
                                      backlogItems);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Execution of new scrum that will dete tasks from Done, and put all current task to BackLog.
        /// </summary>
        public void NewScrumCommandExecute()
        {
            foreach (var i in Done)
            {
                DeleteTask(i);
            }

            Done.Clear();

            foreach (var i in Doing)
            {
                i.States = BackLog.State.Backlog;
                PutTask(i);
                Backlog.Add(i);
            }
            foreach (var i in ToDo)
            {
                i.States = BackLog.State.Backlog;
                PutTask(i);
                Backlog.Add(i);
            }

            Doing.Clear();
            ToDo.Clear();
        }
Exemplo n.º 3
0
        public void RefreshMainWindow()
        {
            ToDo.Clear();
            Doing.Clear();
            Backlog.Clear();
            Done.Clear();

            var result = readDbDataToDisplay();

            foreach (var i in result)
            {
                if (i.States == BackLog.State.IsToDo)
                {
                    ToDo.Add(i);
                }
                else if (i.States == BackLog.State.IsDoing)
                {
                    Doing.Add(i);
                }
                else if (i.States == BackLog.State.Backlog)
                {
                    Backlog.Add(i);
                }
                else
                {
                    Done.Add(i);
                }
            }
        }
Exemplo n.º 4
0
        public async void SaveAsync <T>(T a) where T : class
        {
            if (typeof(T) == typeof(Models.Backlog))
            {
                Backlog.Add(a as Models.Backlog);
                await SaveChangesAsync();
            }
            else if (typeof(T) == typeof(Models.Project))
            {
                Project.Add(a as Models.Project);
                await SaveChangesAsync();
            }
            else if (typeof(T) == typeof(Models.Sprint))
            {
                Sprint.Add(a as Models.Sprint);
                await SaveChangesAsync();
            }

            else if (typeof(T) == typeof(Models.Step))
            {
                Step.Add(a as Models.Step);
                await SaveChangesAsync();
            }
            else if (typeof(T) == typeof(Models.Task))
            {
                Task.Add(a as Models.Task);
                await SaveChangesAsync();
            }
            else if (typeof(T) == typeof(Models.User))
            {
                User.Add(a as Models.User);
                await SaveChangesAsync();
            }
        }
Exemplo n.º 5
0
        public void CanAddUserStory()
        {
            var backlog = new Backlog();
            backlog.Add(new BacklogItem("US1"));

            var backlogItem = backlog.Items.Single();

            Assert.AreEqual("US1", backlogItem.Name);
        }
Exemplo n.º 6
0
        public void CanAddUserStoryWithComponents()
        {
            var backlog = new Backlog();
            var component = new Component("A");
            var item = new BacklogItem("US1", component);
            backlog.Add(item);

            var backlogItem = backlog.Items.Single();

            Assert.AreEqual(new Component("A"), backlogItem.FindComponentFor(new Skill("A")));
        }
        public ProjectModel(string date, string owner, string name, string description, string sDate, string eDate)
        {
            CreationDate  = date;
            OwnerUsername = owner;
            ProjectName   = name;
            Description   = description;

            SprintConfig = new SprintConfigModel(sDate, eDate);

            SprintHistory.Add(new SprintHistoryModel());
            Backlog.Add(new BacklogModel());
            Sprint.Add(new SprintModel());
        }
 public void CompleteCurrentSprint()
 {
     if (CurrentSprint.EndDate.Date == DateTime.Today)
     {
         foreach (var ticket in CurrentSprint.SprintBacklog)
         {
             if (ticket.Status != TicketStatus.Done)
             {
                 Backlog.Add(ticket);
                 ticket.ChangeStatusToToDo();
                 // The above method won't pass its own validation because of the conditions it has in the Ticket class (for ex. if TicketStatus == BeingTested the ticket cannot go to the Backlog)
             }
         }
     }
 }
Exemplo n.º 9
0
        /// <summary>
        ///Sætter load udenfor ¨konstrunktoren for at kunne overskue det bedre
        /// </summary>
        public async void Load()
        {
            SprintButton     = "Create";
            Sprint_StartDate = DateTimeOffset.Now;
            Sprint_EndDate   = DateTimeOffset.Now.AddDays(14);

            List <Story> st = await StoryPer.LoadBacklog(LeSingleton.SelectedProject.Project_Id);

            if (st != null)
            {
                foreach (Story storey in st)
                {
                    Backlog.Add(storey);
                }
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// Tilføjer en story til et sprint. Når man tilføjer en story til et sprint vil den blive fjernet fra backloggen.
        /// </summary>
        /// <param name="name">String name er navnet på det listviewet den skal flyttes hen til </param>

        public void MoveStory(string name)
        {
            switch (name)
            {
            case "Backlog":
                Backlog.Add(DragStory);
                SprintBacklog.Remove(DragStory);

                break;

            case "SprintBacklog":
                SprintBacklog.Add(DragStory);
                Backlog.Remove(DragStory);

                break;
            }
        }
 /// <summary>
 /// Removes a channel subscription.
 /// </summary>
 /// <param name="channelName">The name of the channel to unsubscribe.</param>
 /// <returns>An awaitable task to use with async operations.</returns>
 public async Task UnsubscribeAsync(string channelName)
 {
     Guard.ChannelName(channelName);
     if (Channels.TryRemove(channelName, out Channel channel))
     {
         channel.UnbindAll();
         if (channel.IsServerSubscribed && !_connection.IsConnected)
         {
             // No connection to send a pusher:unsubscribe message so add to the backlog until connected again.
             // If we do not do this we could still receive channel events later even though we unsubscribed.
             Backlog.Add(channel);
         }
         else
         {
             await SendUnsubscribeAsync(channel).ConfigureAwait(false);
         }
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// Method that will refresh all the data in the view. Specifically it will add a backlog item to the new correct Observable list
 /// This is called from the edit Command, so we after deleted the item from the prvious view, add it to the new view.
 /// </summary>
 /// <param name="item">Specific item you want to change to a new listbox in the view</param>
 public void RefreshMainWindow(BackLog item)
 {
     if (item.States == BackLog.State.IsToDo)
     {
         ToDo.Add(item);
     }
     else if (item.States == BackLog.State.IsDoing)
     {
         Doing.Add(item);
     }
     else if (item.States == BackLog.State.Backlog)
     {
         Backlog.Add(item);
     }
     else
     {
         Done.Add(item);
     }
 }
Exemplo n.º 13
0
        /// <summary>
        /// Ctor. Need to read all data from WebAPI (Database), and populate the above ObservableCollections.
        /// These bind to 4 different listbox in View.
        /// </summary>
        public BackLogController()
        {
            if (_client.BaseAddress == null)
            {
                _client.BaseAddress = new Uri("http://localhost:4200/");

                _client.DefaultRequestHeaders.Accept.Clear();
                _client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            }

            var result = readDbDataToDisplay();

            foreach (var i in result)
            {
                if (i.States == BackLog.State.IsToDo)
                {
                    ToDo.Add(i);
                }
                else if (i.States == BackLog.State.IsDoing)
                {
                    Doing.Add(i);
                }
                else if (i.States == BackLog.State.Backlog)
                {
                    Backlog.Add(i);
                }
                else
                {
                    Done.Add(i);
                }
            }

            //Here I read settings file for background color of main window.
            string color = Properties.Settings.Default.Color;
            var    brush = new SolidColorBrush((Color)ColorConverter.ConvertFromString(color));

            BackgroundColor = brush;

            NotifyPropertyChanged();

            UpdateChart();
        }
Exemplo n.º 14
0
        /// <summary>
        /// Execeute that will add a new task. This will show a dialog with the AddTask.xaml window.
        /// </summary>
        private void AddTask()
        {
            BackLog newItem = new BackLog();
            var     dlg     = new AddTask();

            dlg.Title = "Add new task";
            BackLog newTask = new BackLog();

            dlg.DataContext = newTask;
            // Here we have selected done, and we are ready to push the data to the database, and update the main window view.
            if (dlg.ShowDialog() == true)
            {
                newTask.States = BackLog.State.Backlog;

                NotifyPropertyChanged();
                Backlog.Add(newTask);

                AddTask(newTask);
            }
            UpdateChart();
        }
Exemplo n.º 15
0
 public BacklogBuilder WithItem(string name, params string[] components)
 {
     backlog.Add(new BacklogItem(name, components.Select(_ => new Component(_)).ToArray()));
     return(this);
 }