public void GetAttendees_WhenNoAttendancesAndCalled_ReturnEmptyList() { var gig = new Gig(); var attendees = gig.GetAttendees(); attendees.Count.Should().Be(0); }
public void GetAttendees_WhenCalled_ReturnAllAttendees() { var gig = new Gig(); gig.Attendances.Add(new Attendance { Attendee = new ApplicationUser { Id = "1" } }); var attendees = gig.GetAttendees(); attendees.Count.Should().Be(1); }
public void Cancel_WhenCalled_EachAttendeeShouldHaveANotification() { var gig = new Gig(); gig.Attendances.Add(new Attendance { Attendee = new ApplicationUser { Id = "1" } }); gig.Cancel(); var attendes = gig.GetAttendees(); attendes.ElementAt(0).UserNotifications.Count.Should().Be(1); }
public void Cancel_WhenCalled_EachAttendeeShouldHaveNotification() { var gig = new Gig(); gig.Attendances.Add(new Attendance { Attendee = new ApplicationUser { Id = "1" } }); gig.Cancel(); var notifications = gig.GetAttendees().First().UserNotifications; notifications.Count.Should().Be(1); notifications.First().Notification.Type.Should().Be(NotificationType.GigCancelled); }
public void Modify_WhenCalled_EachAttendeeShouldHaveNotification() { var gig = new Gig(); gig.Attendances.Add(new Attendance { Attendee = new ApplicationUser { Id = "1" } }); var newVenue = "NewVenue"; var newDate = DateTime.Now; var genreId = Byte.MinValue; gig.Modify(newVenue, newDate, genreId); var notifications = gig.GetAttendees().First().UserNotifications; notifications.Count.Should().Be(1); notifications.First().Notification.Type.Should().Be(NotificationType.GigUpdated); }