Пример #1
0
        public void Should_remove_crew_members()
        {
            var place = new PlaceMock();
            var crewMemberThatMustStay       = new Pilot("pilot name");
            var crewMembersThatMustBeRemoved = new List <CrewMember>
            {
                new Policeman("policeman name"),
                new Prisoner("prisoner name"),
            };

            var crewMembers = new List <CrewMember>();

            crewMembers.Add(crewMemberThatMustStay);
            crewMembers.AddRange(crewMembersThatMustBeRemoved);

            place.Board(crewMembers);

            place.Remove(crewMembersThatMustBeRemoved.First(), crewMembersThatMustBeRemoved.Last());

            Assert.Contains(crewMemberThatMustStay, place.CrewMembers);
            Assert.Single(place.CrewMembers);
        }