private void Given_That_The_Conference_Has_No_CalendarEntries_Recorded() { _conference = new Conference(1, "", ""); _conference.AddToCalendar(ConferenceHelper.GetOpenVotingPeriod()); _conference.AddToCalendar(ConferenceHelper.GetPastSubmissionPeriod()); _conference.AddToCalendar(ConferenceHelper.GetFutureAgendaPublishingDate()); _conference.AddToCalendar(ConferenceHelper.GetFutureRegistration()); }
public void BeforeEachTest() { _voteRepository = Substitute.For <IVoteRepository>(); _voteRepository.HasVotedFor(Arg.Any <int>(), Arg.Any <Guid>()).Returns(true); _conferenceLoader = Substitute.For <IConferenceLoader>(); var conference = new Conference(1, "", ""); conference.AddToCalendar(ConferenceHelper.GetOpenVotingPeriod()); _conferenceLoader.LoadConference(Arg.Is(1)).Returns(conference); _handler = new RegisterVoteCommandHandler(_voteRepository, _conferenceLoader); }