public async Task EventDoesNotExist() { var query = new EventDetailForNotificationQueryAsync { EventId = 999, UserId = _user1.Id }; var handler = new EventDetailForNotificationQueryHandlerAsync(Context); var result = await handler.Handle(query); Assert.Null(result); }
public async Task EventDoesNotExist() { var context = ServiceProvider.GetService <AllReadyContext>(); var query = new EventDetailForNotificationQueryAsync { EventId = 999, UserId = _user1.Id }; var handler = new EventDetailForNotificationQueryHandlerAsync(context); var result = await handler.Handle(query); Assert.Null(result); }
public async Task ModelCanBeCreatedFomExistingEvent() { var query = new EventDetailForNotificationQueryAsync { EventId = 1, UserId = _user1.Id }; var handler = new EventDetailForNotificationQueryHandlerAsync(Context); var result = await handler.Handle(query); Assert.NotNull(result); Assert.True(_queenAnne.UsersSignedUp.Count == result.UsersSignedUp.Count, "Count of signed up users does not match"); Assert.True(_queenAnne.Tasks.Count == result.Tasks.Count, "Count of tasks does not match"); Assert.True(_queenAnne.Tasks[0].AssignedVolunteers.Count == result.Tasks[0].AssignedVolunteers.Count, "Count of volunteers assigned to tak does not match"); Assert.True(_firePrev.CampaignContacts.Count == result.CampaignContacts.Count, "Count of campaign contacts does not match"); }
public async Task EventDoesNotExist() { var context = ServiceProvider.GetService<AllReadyContext>(); var query = new EventDetailForNotificationQueryAsync { EventId = 999, UserId = _user1.Id}; var handler = new EventDetailForNotificationQueryHandlerAsync(context); var result = await handler.Handle(query); Assert.Null(result); }
public async Task ModelCanBeCreatedFomExistingEvent() { var context = ServiceProvider.GetService<AllReadyContext>(); var query = new EventDetailForNotificationQueryAsync { EventId = 1, UserId = _user1.Id }; var handler = new EventDetailForNotificationQueryHandlerAsync(context); var result = await handler.Handle(query); Assert.NotNull(result); Assert.True(_queenAnne.UsersSignedUp.Count == result.UsersSignedUp.Count, "Count of signed up users does not match"); Assert.True(_queenAnne.Tasks.Count == result.Tasks.Count, "Count of tasks does not match"); Assert.True(_queenAnne.Tasks[0].AssignedVolunteers.Count == result.Tasks[0].AssignedVolunteers.Count, "Count of volunteers assigned to tak does not match"); Assert.True(_firePrev.CampaignContacts.Count == result.CampaignContacts.Count, "Count of campaign contacts does not match"); }