Пример #1
0
        private void GetAttendeesForList(List <EventRequest> list)
        {
            var attendees = Attendee.GetAll();

            foreach (EventRequest req in list)
            {
                req.Attendees = attendees.Where(x => x.EventRequestId == req.Id).ToList();
            }
        }
Пример #2
0
 public void GetAll_ShouldReturn_NonNull_ListOf_AttendeeDTO()
 {
     //Act
     IAttendee attendee = new Attendee();
     IList<AttendeeDTO> attendeeDtos = attendee.GetAll();
     //Assert
     attendeeDtos.ShouldNotBeNull("Expected AttendeeDTO List Not To Be Null");
     Assert.IsInstanceOfType(attendeeDtos, typeof (IList<AttendeeDTO>));
 }
Пример #3
0
 public void GetAll_ShouldReturn_NonNull_ListOf_AttendeeDTO()
 {
     //Arrange
     _mockRepo.Expect(x => x.GetAll()).Return(new List<AttendeeDTO> ()).Repeat.Once();
     _mockRepository.ReplayAll();
     //Act
     IAttendee attendee = new Attendee(_mockRepo);
     IList<AttendeeDTO> attendeeDtos = attendee.GetAll();
     //Assert
     _mockRepository.VerifyAll();
     attendeeDtos.ShouldNotBeNull("Expected AttendeeDTO List Not To Be Null");
     Assert.IsInstanceOfType(attendeeDtos, typeof(IList<AttendeeDTO>));
 }