示例#1
0
        public void CanChooseWork()
        {
            var programmer       = Create.Programmer.WithSkill("A").Please;
            var team             = Create.Team.With(programmer);
            var backlog          = Create.Backlog.WithItem("US1", "A", "B");
            var teamWorkStrategy = new IgnoreBacklogOrderTeamWorkStrategy();

            teamWorkStrategy.DistributeWork(backlog, team);

            Assert.That(programmer.WorkItem, Looks.LikeWorkItem("US1.A"));
        }
示例#2
0
        public void TShapedTeam_CanWorkOnMultipleComponents()
        {
            var homer   = Create.Programmer.WithSkills("A", "B").Please;
            var marge   = Create.Programmer.WithSkills("A", "B").Please;
            var team    = Create.Team.With(homer, marge).Please;
            var backlog = Create.Backlog
                          .WithItem("US1", "A", "B");

            team.DistributeWork(backlog);

            Assert.That(homer.WorkItem, Looks.LikeWorkItem("US1.A"));
            Assert.That(marge.WorkItem, Looks.LikeWorkItem("US1.B"));
        }
示例#3
0
        public void SecondWorkDistribution_DistributesSecondWorkItem()
        {
            var homer   = Create.Programmer.WithSkill("A").Please;
            var team    = Create.Team.With(homer).Please;
            var backlog = Create.Backlog
                          .WithItem("US1", "A")
                          .WithItem("US2", "A");

            team.DistributeWork(backlog);
            team.DistributeWork(backlog);

            Assert.That(homer.WorkItem, Looks.LikeWorkItem("US2.A"));
        }
示例#4
0
        public void TeamCanDistributeWorkAcrossProgrammersForDay()
        {
            var programmerA = Create.Programmer.WithSkill("A").Please;
            var programmerB = Create.Programmer.WithSkill("B").Please;
            var team        = Create.Team.With(programmerA, programmerB).Please;
            var backlog     = Create.Backlog
                              .WithItem("US1", "A", "B");

            team.DistributeWork(backlog);

            Assert.That(programmerA.WorkItem, Looks.LikeWorkItem("US1.A"));
            Assert.That(programmerB.WorkItem, Looks.LikeWorkItem("US1.B"));
        }
示例#5
0
        public void When2ProgrammersDo1PBI_Programmer2HasDoesNothing()
        {
            var programmer1      = Create.Programmer.WithSkill("A").Please;
            var programmer2      = Create.Programmer.WithSkill("A").Please;
            var team             = Create.Team.With(programmer1, programmer2);
            var backlog          = Create.Backlog.WithItem("US1", "A");
            var teamWorkStrategy = new IgnoreBacklogOrderTeamWorkStrategy();

            teamWorkStrategy.DistributeWork(backlog, team);

            Assert.That(programmer1.WorkItem, Looks.LikeWorkItem("US1.A"));
            Assert.False(programmer2.IsWorking);
        }
        public void RespectWipLimit()
        {
            var homer   = Create.Programmer.WithSkill("A").Please;
            var marge   = Create.Programmer.WithSkill("B").Please;
            var team    = Create.Team.With(homer, marge);
            var backlog = Create.Backlog
                          .WithItem("US1", "A")
                          .WithItem("US2", "B");
            var teamWorkStrategy = new RespectWipLimitIgnoreBacklogOrderTeamWorkStrategy(wipLimit: 1);

            teamWorkStrategy.DistributeWork(backlog, team);

            Assert.That(homer.WorkItem, Looks.LikeWorkItem("US1.A"));
            Assert.False(marge.IsWorking);
        }
示例#7
0
        public void TeamCanDistributeThreeBacklogItemsAcrossThreeProgrammers()
        {
            var programmerA = Create.Programmer.WithSkill("A").Please;
            var programmerB = Create.Programmer.WithSkill("B").Please;
            var programmerC = Create.Programmer.WithSkill("C").Please;
            var team        = Create.Team.With(programmerA, programmerB, programmerC).Please;
            var backlog     = Create.Backlog
                              .WithItem("US1", "A", "B")
                              .WithItem("US2", "C");

            team.DistributeWork(backlog);

            Assert.That(programmerA.WorkItem, Looks.LikeWorkItem("US1.A"));
            Assert.That(programmerB.WorkItem, Looks.LikeWorkItem("US1.B"));
            Assert.That(programmerC.WorkItem, Looks.LikeWorkItem("US2.C"));
        }