public void TestVindGeenSprintGebruikerVanAndereSprints()
        {
            User gb = new User();
            Sprint sprint2 = new Sprint();
            sprint2.AddUser(gb, SprintRole.Developer);
            sprint.AddUser(gb, SprintRole.Developer);

            SprintUser sg = gb.GetSprintUserFor(sprint);

            Assert.AreEqual(sprint, sg.Sprint);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Process this object with the given sprint
        /// </summary>
        /// <param name="sprint"></param>
        public virtual void Process(Sprint sprint)
        {
            if (user == null || sprint == null)
                return;

            SprintUser sprintGebruiker = sprint.GetSprintUserFor(user);

            if (sprintRole == 0)
            {
                if (sprintGebruiker == null)
                    return;

                sprintGebruiker.DecoupleSprintUser();
            }
            else
            {
                if (sprintGebruiker == null)
                    sprint.AddUser(user, sprintRole);
                else
                    sprintGebruiker.SprintRole = sprintRole;
            }
        }
Exemplo n.º 3
0
        public override void SetUp()
        {
            Random random = new Random();

            base.SetUp();

            // 4 gebruikers
            for (int i = 0; i<testCaseDevelopers.Length; i++ )
            {
                testCaseDevelopers[i] = Creation.Gebruiker(SystemRole.User);
            }

            // 1 project
            testCaseProject = Creation.Project();

            // 1 sprint
            testCaseSprint = Creation.Sprint(testCaseProject);
            testCaseSprint.WorkDays = 40; // 4 devvers voor 2 weken = 4 * 2 * 5 dagen.

            foreach (User developer in testCaseDevelopers)
            {
                testCaseSprint.AddUser(developer, SprintRole.Developer);
            }
            testCaseSprint.SprintUsers[0].AddRole(SprintRole.ScrumMaster);

            // 1 story, 2 taken, beide afgesloten
            const int hoursPerStoryPoint = 2;
            Story testCaseStory1 = Creation.Story(testCaseProject, StoryPoint.Eight, hoursPerStoryPoint, Priority.Must, testCaseDevelopers[random.Next(0,3)]);
            testCaseSprint.CreateSprintStoryFor(testCaseStory1);

            Task task1_1 = Creation.Task();
            testCaseStory1.AddTask(task1_1);
            task1_1.RegisterTime(testCaseDevelopers[random.Next(0, 3)], DateTime.Now, testCaseSprint, new TimeSpan(8,0,0));
            task1_1.Close();
            Task task1_2 = Creation.Task();
            testCaseStory1.AddTask(task1_2);
            task1_2.RegisterTime(testCaseDevelopers[random.Next(0, 3)], DateTime.Now, testCaseSprint, new TimeSpan(12, 0, 0));
            task1_2.Close();
        }