Ejemplo n.º 1
0
        public void WhenNoLeadersAndMembers_ArrangeTeams_TeamsShouldBeEmpty()
        {
            Meeting meeting = this.EmptyMeeting();

            meeting.ArrangeTeams();
            IEnumerable <Team> teams = meeting.Teams;

            teams.Should().BeEmpty();
        }
Ejemplo n.º 2
0
        public void WhenOneLeaderAndNoMembers_ArrangeTeams_ShouldBe1Team()
        {
            Meeting meeting = this.EmptyMeeting();
            User    user    = new User("domain\\user");

            meeting.AddLeader(user);

            meeting.ArrangeTeams();
            IEnumerable <Team> teams = meeting.Teams;

            teams.Should().HaveCount(1);
            teams.Single().Users.Should().HaveCount(0);
            teams.Single().Leader.Should().Be(user);
        }
Ejemplo n.º 3
0
        public void WhenOneMemberAndOneLeader_ArrangeTeams_TeamsShouldContain2Users()
        {
            Meeting meeting = this.EmptyMeeting();
            User    user1   = new User("domain\\user1");
            User    user2   = new User("domain\\user2");

            meeting.AddLeader(user1);
            meeting.AddMember(user2);

            meeting.ArrangeTeams();
            IEnumerable <Team> teams = meeting.Teams;

            teams.Should().HaveCount(1);
            teams.Single().Users.Should().HaveCount(1);
            teams.Single().Users.Should().Contain(user2);
            teams.Single().Leader.Should().Be(user1);
        }
Ejemplo n.º 4
0
        public void ArrangeTeams(Guid meetingId)
        {
            Meeting meeting = this.bunchOfMeetings.Get(meetingId);

            meeting.ArrangeTeams();
        }