Exemplo n.º 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"));
        }
Exemplo n.º 2
0
        public void WhenNoWork_DoNothing()
        {
            var programmer       = Create.Programmer.WithSkill("A").Please;
            var team             = Create.Team.With(programmer);
            var backlog          = Create.Backlog.WithItem("US1", "B");
            var teamWorkStrategy = new IgnoreBacklogOrderTeamWorkStrategy();

            teamWorkStrategy.DistributeWork(backlog, team);

            Assert.False(programmer.IsWorking);
        }
Exemplo n.º 3
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);
        }