public GetCreatedMeetingGroupFromMeetingsProbe( Guid expectedMeetingGroupId, IMeetingsModule meetingsModule) { _expectedMeetingGroupId = expectedMeetingGroupId; _meetingsModule = meetingsModule; }
public async Task BeforeEachTest() { const string connectionStringEnvironmentVariable = "ASPNETCORE_MyMeetings_IntegrationTests_ConnectionString"; ConnectionString = Environment.GetEnvironmentVariable(connectionStringEnvironmentVariable, EnvironmentVariableTarget.Machine); if (ConnectionString == null) { throw new ApplicationException( $"Define connection string to integration tests database using environment variable: {connectionStringEnvironmentVariable}"); } using (var sqlConnection = new SqlConnection(ConnectionString)) { await ClearDatabase(sqlConnection); } Logger = Substitute.For <ILogger>(); EmailSender = Substitute.For <IEmailSender>(); ExecutionContext = new ExecutionContextMock(Guid.NewGuid()); MeetingsStartup.Initialize( ConnectionString, ExecutionContext, Logger, new EmailsConfiguration("*****@*****.**"), null); MeetingsModule = new MeetingsModule(); }
public GetMeetingCommentsProbe( IMeetingsModule meetingsModule, Guid meetingId, Guid likedMeetingCommentId, int expectedCommentLikesCount) { _meetingsModule = meetingsModule; _meetingId = meetingId; _likedMeetingCommentId = likedMeetingCommentId; _expectedCommentLikesCount = expectedCommentLikesCount; }
public static async Task <Guid> CreateMeetingAsync( IMeetingsModule meetingsModule, ExecutionContextMock executionContext) { var proposalId = await meetingsModule.ExecuteCommandAsync( new ProposeMeetingGroupCommand( "Amazing group", "Absolutely amazing meeting group.", "London", "UK")); await meetingsModule.ExecuteCommandAsync( new CreateNewMeetingGroupCommand( Guid.NewGuid(), new MeetingGroupProposalId(proposalId))); var meetingGroups = await meetingsModule.ExecuteQueryAsync(new GetAllMeetingGroupsQuery()); var meetingGroup = meetingGroups.Single(); await meetingsModule.ExecuteCommandAsync( new SetMeetingGroupExpirationDateCommand( Guid.NewGuid(), meetingGroup.Id, SystemClock.Now.AddMonths(1))); var meetingId = await meetingsModule.ExecuteCommandAsync( new CreateMeetingCommand( meetingGroup.Id, "Some meeting", DateTime.UtcNow.AddDays(1), DateTime.UtcNow.AddDays(10), "Some very nice meeting.", "UK", "Baker street", "W2 2SZ", "London", 25, 1, null, null, null, null, new List <Guid> { executionContext.UserId })); return(meetingId); }
public MeetingsController(IMeetingsModule meetingsModule) { _meetingsModule = meetingsModule; }
public MeetingGroupProposalsController(IMeetingsModule meetingsModule) { _meetingsModule = meetingsModule; }
public GetLikedMeetingCommentProbe(IMeetingsModule meetingsModule, Guid meetingId, Guid likedMeetingCommentId) { _meetingsModule = meetingsModule; _meetingId = meetingId; _likedMeetingCommentId = likedMeetingCommentId; }
public MeetingCommentsController(IMeetingsModule meetingModule) { _meetingModule = meetingModule; }
public CountriesController(IMeetingsModule meetingsModule) { _meetingsModule = meetingsModule; }
public MeetingCommentingConfigurationController(IMeetingsModule meetingsModule) { _meetingsModule = meetingsModule; }