public void ActivityDoesNotExist() { var context = ServiceProvider.GetService <AllReadyContext>(); var query = new ActivityDetailForNotificationQuery { ActivityId = 999, UserId = _user1.Id }; var handler = new ActivityDetailForNotificationQueryHandler(context); var result = handler.Handle(query); Assert.Null(result); }
public void ModelCanBeCreatedFomExistingActivity() { var context = ServiceProvider.GetService <AllReadyContext>(); var query = new ActivityDetailForNotificationQuery { ActivityId = 1, UserId = _user1.Id }; var handler = new ActivityDetailForNotificationQueryHandler(context); var result = 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 void ActivityDoesNotExist() { var context = ServiceProvider.GetService<AllReadyContext>(); var query = new ActivityDetailForNotificationQuery { ActivityId = 999 }; var handler = new ActivityDetailForNotificationQueryHandler(context); var result = handler.Handle(query); Assert.Null(result); }
public void ModelCanBeCreatedFomExistingActivity() { var context = ServiceProvider.GetService<AllReadyContext>(); var query = new ActivityDetailForNotificationQuery { ActivityId = 1 }; var handler = new ActivityDetailForNotificationQueryHandler(context); var result = 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"); }