public void FilterOutUsersWhoHaveNotBeenSelected()
        {
            var profileFilter = new SelectedSpeakerProfileFilter();

            var profile1 = new UserProfile {UserId = 123};
            var profile2 = new UserProfile {UserId = 48};
            var profile3 = new UserProfile {UserId = 456};

            var profiles = profileFilter.FilterProfiles(new[] {profile1, profile2, profile3});

            CollectionAssert.AreEquivalent(new[] {profile2}, profiles);
        }
예제 #2
0
        public IUserProfileFilter Create(IConference conference)
        {
            IUserProfileFilter userProfileFilter;

            if (conference.CanPublishAgenda())
            {
                userProfileFilter = new SelectedSpeakerProfileFilter(SelectedSessions.SpeakerIds);
            }
            else
            {
                userProfileFilter = new SubmittedSessionProfileFilter(sessionRepository);
            }

            return(userProfileFilter);
        }
        public IUserProfileFilter Create(IConference conference)
        {
            IUserProfileFilter userProfileFilter;

            if (conference.CanPublishAgenda())
            {
                userProfileFilter = new SelectedSpeakerProfileFilter();
            }
            else
            {
                userProfileFilter = new SubmittedSessionProfileFilter(sessionRepository);
            }

            return userProfileFilter;
        }